Skip to content

Commit

Permalink
create workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
epassaro committed Jun 4, 2021
1 parent 267906d commit dbc49df
Show file tree
Hide file tree
Showing 2 changed files with 82 additions and 129 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/update-zenodo-json.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# For more information on how to use this template please refer to:
# http://tardis-sn.github.io/tardis/development/continuous_integration.html

name: zenodo

on:
push:
branches:
- move-zenodo-ga

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
repository: tardis-sn/tardis_zenodo
token: ${{ secrets.BOT_TOKEN }}

- name: Dump Secret Key
run: echo "$KEY_SECRET_JSON" > key_secret.json
env:
KEY_SECRET_JSON: ${{ secrets.ZENODO_KEY_SECRET_JSON }}

- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.6

- name: Install Packages
run: pip install pandas==1.0.5 jupyter nbconvert==5.3.1 tornado==4.2 orcid

- name: Run Notebook
run: jupyter nbconvert gather_data.ipynb --to html --execute --ExecutePreprocessor.timeout=6000

- name: Run Notebook (allow errors)
run: jupyter nbconvert gather_data.ipynb --to html --execute --ExecutePreprocessor.timeout=6000 --allow-errors
if: ${{ failure() }}

- uses: actions/upload-artifact@v2
with:
name: zenodo_json
path: .zenodo.json

- uses: actions/upload-artifact@v2
with:
name: notebook
path: gather_data.html
if: ${{ always() }}

push:
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
with:
repository: epassaro/tardis
token: ${{ secrets.BOT_TOKEN }}
fetch-depth: 0

- uses: actions/download-artifact@v2
with:
name: zenodo_json

- name: Configure Bot User
run: |
git config --global user.email "[email protected]"
git config --global user.name "tardis-bot"
- name: Push Changes
run: |
git add -f zenodo.json
if git diff --staged --quiet; then
echo "No changes made. Exiting."
exit 0
else
git commit -m "Update zenodo.json [skip ci]"
git push
fi
129 changes: 0 additions & 129 deletions azure-pipelines/update-zenodo-json.yml

This file was deleted.

0 comments on commit dbc49df

Please sign in to comment.