Skip to content

Commit 34084c6

Browse files
committed
Simplifying the GitHub Pages publishing action
1 parent 9beadf5 commit 34084c6

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

.github/workflows/publish-github-pages.yml

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,12 @@ name: "PublishGitHubPages"
88

99
on:
1010
push:
11-
branches: [ main ]
11+
branches:
12+
- main
13+
paths:
14+
- 'documentation/**'
1215
schedule:
13-
- cron: '15 3 * * 1'
16+
- cron: '15 3 * * *'
1417

1518
defaults:
1619
run:
@@ -36,19 +39,7 @@ jobs:
3639
path: gh-pages
3740
token: ${{ secrets.PUBLISH_SECRET }}
3841

39-
- name: Verify changes to documentation present
40-
id: change-check
41-
run: |
42-
cd $GITHUB_WORKSPACE/main
43-
X=`git diff HEAD~1 --name-only | { grep "^documentation" || test $? = 1; } | wc -l`
44-
if [ $X == "0" ]; then
45-
echo 'No changes to the documenation'
46-
else
47-
echo '::set-output name=DOCUMENTATION_CHANGED::true'
48-
fi
49-
5042
- name: Build and publish site
51-
if: ${{ steps.change-check.outputs.DOCUMENTATION_CHANGED == 'true' }}
5243
run: |
5344
curl -fL -o hugo.tar.gz "https://github.com/gohugoio/hugo/releases/download/v0.82.0/hugo_0.82.0_Linux-64bit.tar.gz"
5445
tar -xf hugo.tar.gz

0 commit comments

Comments
 (0)