-
-
Notifications
You must be signed in to change notification settings - Fork 61
29 lines (29 loc) · 935 Bytes
/
convert.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
on:
schedule:
- cron: '0 9 * * 1'
name: Convert
jobs:
bookdown:
name: Convert
runs-on: ubuntu-latest
container: ghcr.io/geocompx/docker:python
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Convert-and-push
if: contains(github.event.head_commit.message, 'convert')
run: |
pip3 install jupytext
# Convert .qmd files to .ipynb and .py files, see convert.sh
./convert.sh
- name: Commit-and-push
run: |
git config --global --add safe.directory "$GITHUB_WORKSPACE"
git status
git config user.name github-actions
git config user.email github-actions@github.com
git add *.ipynb
git add *.py
git commit -m 'Re-build .ipynb and .py files' || echo "No changes to commit"
git push origin || echo "No changes to commit"