File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change 13
13
tags :
14
14
- " *"
15
15
16
+ pull_request :
17
+ branches : [main]
18
+ paths :
19
+ - " .github/workflows/documentation.yml"
20
+ - requirements/documentation.txt
21
+
16
22
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
17
23
permissions :
18
24
contents : read
@@ -54,15 +60,26 @@ jobs:
54
60
- name : Build static website
55
61
run : mkdocs build --verbose
56
62
63
+ - name : Save build doc as artifact
64
+ uses : actions/upload-artifact@v3
65
+ with :
66
+ name : documentation
67
+ path : site/
68
+ if-no-files-found : error
69
+ retention-days : 30
70
+
57
71
- name : Setup Pages
58
72
uses : actions/configure-pages@v3
73
+ if : github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main')
59
74
60
75
- name : Upload artifact
61
76
uses : actions/upload-pages-artifact@v1
77
+ if : github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main')
62
78
with :
63
79
# Upload entire repository
64
- path : site
80
+ path : site/
65
81
66
82
- name : Deploy to GitHub Pages
67
83
id : deployment
84
+ if : github.event_name == 'push' && (startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/main')
68
85
uses : actions/deploy-pages@v1
You can’t perform that action at this time.
0 commit comments