File tree Expand file tree Collapse file tree 1 file changed +7
-17
lines changed Expand file tree Collapse file tree 1 file changed +7
-17
lines changed Original file line number Diff line number Diff line change 1
- # Copyright (c) 2021, Oracle and/or its affiliates.
1
+ # Copyright (c) 2021, 2023, Oracle and/or its affiliates.
2
2
# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl.
3
3
#
4
4
# Description
@@ -8,7 +8,10 @@ name: "PublishGitHubPages"
8
8
9
9
on :
10
10
push :
11
- branches : [ main ]
11
+ branches :
12
+ - ' main'
13
+ paths :
14
+ - ' documentation/**'
12
15
schedule :
13
16
- cron : ' 15 3 * * 1'
14
17
@@ -23,32 +26,19 @@ jobs:
23
26
24
27
steps :
25
28
- name : Checkout main
26
- uses : actions/checkout@v2.3.4
29
+ uses : actions/checkout@v3
27
30
with :
28
31
ref : main
29
- fetch-depth : 32
30
32
path : main
31
33
32
34
- name : Checkout gh-pages
33
- uses : actions/checkout@v2.3.4
35
+ uses : actions/checkout@v3
34
36
with :
35
37
ref : gh-pages
36
38
path : gh-pages
37
39
token : ${{ secrets.PUBLISH_SECRET }}
38
40
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
-
50
41
- name : Build and publish site
51
- if : ${{ steps.change-check.outputs.DOCUMENTATION_CHANGED == 'true' }}
52
42
run : |
53
43
curl -fL -o hugo.tar.gz "https://github.com/gohugoio/hugo/releases/download/v0.82.0/hugo_0.82.0_Linux-64bit.tar.gz"
54
44
tar -xf hugo.tar.gz
You can’t perform that action at this time.
0 commit comments