-
Notifications
You must be signed in to change notification settings - Fork 18
42 lines (34 loc) · 1.04 KB
/
publish-on-push.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
30
31
32
33
34
35
36
37
38
39
40
41
#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: true
- name: Set Git config
run: |
git config --global user.email "[email protected]"
git config --global user.name "GitHub Actions"
- name: Update odis-in submodule
run: |
git pull --recurse-submodules
git submodule update --remote --recursive
git commit -am "Auto-update submodule" && git push || echo "No changes to commit"
- 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