File tree Expand file tree Collapse file tree 1 file changed +28
-9
lines changed Expand file tree Collapse file tree 1 file changed +28
-9
lines changed Original file line number Diff line number Diff line change 65
65
66
66
# Specify whether to download Git-LFS files:
67
67
lfs : false
68
+
69
+ # GitHub token:
70
+ token : ${{ secrets.GITHUB_TOKEN }}
68
71
timeout-minutes : 10
69
72
70
73
# Install Python:
82
85
# Generate the documentation:
83
86
- name : ' Build documentation'
84
87
run : |
85
- # Turn warnings into errors; ensure .doctrees doesn't get deployed
88
+ # Turn warnings into errors and ensure .doctrees is not deployed:
86
89
sphinx-build -b html -WT --keep-going spec build/latest -d doctrees
87
- touch build/.nojekyll
88
90
89
91
# Upload the build artifact:
90
92
- name : ' Upload build artifact'
@@ -95,10 +97,27 @@ jobs:
95
97
path : build/
96
98
if-no-files-found : error
97
99
98
- # Deploy the build artifact to gh-pages:
99
- - name : ' Deploy'
100
- uses : peaceiris/actions-gh-pages@v3
101
- if : ${{ github.ref == 'refs/heads/main'}}
102
- with :
103
- github_token : ${{ secrets.GITHUB_TOKEN }}
104
- publish_dir : ./build
100
+ # Configure Git:
101
+ - name : ' Configure Git'
102
+ run : |
103
+ git config --local user.email "[email protected] "
104
+ git config --local user.name "array-api-bot"
105
+ timeout-minutes : 5
106
+
107
+ # Checkout the gh-pages branch:
108
+ - name : ' Checkout gh-pages'
109
+ run : |
110
+ git checkout gh-pages
111
+ timeout-minutes : 5
112
+
113
+ # Copy build artifact:
114
+ - name : ' Copy build artifact'
115
+ run : |
116
+ cp -R ./build/latest ./latest
117
+ timeout-minutes : 10
118
+
119
+ # Push changes to GitHub:
120
+ - name : ' Committing changes'
121
+ run : |
122
+ git commit -m "Deploy: ${{ github.sha }}" && git push origin gh-pages
123
+ timeout-minutes : 10
You can’t perform that action at this time.
0 commit comments