Skip to content

Commit c07e166

Browse files
Merge pull request #63 from samuel-w/patch-1
Replace reading branch name with native detection
2 parents ad1fd79 + a9c3813 commit c07e166

File tree

1 file changed

+5
-9
lines changed

1 file changed

+5
-9
lines changed

.github/workflows/main.yml

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
name: Update pages
2-
on: [push]
2+
on:
3+
push:
4+
branches:
5+
- source # Only build the "source" branch ("master" = built, published pages, this can't be changed for organization GitHub Pages)
36

47
jobs:
58
update-web:
@@ -13,11 +16,7 @@ jobs:
1316
shell: bash
1417
env:
1518
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
16-
run: |
17-
# Only build the "source" branch ("master" = built, published pages,
18-
# this can't be changed for organization GitHub Pages)
19-
test ${GITHUB_REF##*/} == "source" || exit 0
20-
19+
run: |
2120
# Install dependency
2221
pip install docutils
2322
@@ -29,9 +28,6 @@ jobs:
2928
make clean
3029
make
3130
32-
# Delete workflow for the output ("master") branch,
33-
# so GitHub won't even trigger a build for it.
34-
rm .github/workflows/main.yml
3531
git add --all .
3632
git commit -m "Automatically built pages at $(git rev-parse --short HEAD)" || exit 0
3733

0 commit comments

Comments
 (0)