auto-merge odis-in module #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#publish the book when a Push is made on GitHub, by merging | |
# master into the publication branch (which will then trigger the | |
# deploy-book.yml action) | |
name: "Publish on Push to GitHub" | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
#schedule: | |
#- cron: '30 6 * * 0' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Set Git config | |
run: | | |
git config --global user.email "github-actions@example.com" | |
git config --global user.name "GitHub Actions" | |
- name: Update odis-in submodule | |
run: | | |
git fetch --unshallow | |
git checkout master | |
git submodule update --remote --merge | |
git commit odis-in -m "Auto update odis-in submodule" | |
git push | |
- name: Merge master into publication | |
run: | | |
git fetch --unshallow | |
git checkout publication | |
git pull | |
git merge master -m "Auto-merge master back to publication" | |
git push | |