7474 export MRINUFFT_BACKEND=cufinufft
7575 python -m sphinx docs docs_build ${{ contains(github.event.comment.body, 'fast') && '-D plot_gallery=0' || '' }} -j 5
7676
77+
78+ - name : Upload artifact for pages
79+ if : ${{ github.event_name == 'workflow_run' }}
80+ uses : actions/upload-pages-artifact@v4
81+ with :
82+ path : docs_build
83+
84+
7785 - name : Upload artifact
7886 id : artifact-upload-step
7987 uses : actions/upload-artifact@v4
8492 retention-days : 5
8593
8694 - name : Get artifact ID
95+ if : contains(github.event.comment.body, '/build-docs') && github.event.issue.pull_request && success()
8796 id : get-artifact-id
8897 env :
8998 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
@@ -120,7 +129,10 @@ jobs:
120129 runs-on : ubuntu-latest
121130 needs : build-docs
122131 if : ${{ github.event_name == 'workflow_run' }}
123-
132+ permissions :
133+ pages : write
134+ id-token : write
135+
124136 steps :
125137 - name : Get the docs_build artifact
126138 uses : actions/download-artifact@v4
@@ -133,19 +145,19 @@ jobs:
133145 uses : actions/download-artifact@v4
134146 with :
135147 name : coverage_badge
136- path : docs_build/_static
148+ path : docs_build/examples/ _static
137149 run-id : ${{ github.event.workflow_run.id}}
138150 github-token : ${{ secrets.GITHUB_TOKEN }}
139151
140- - name : Display structure of docs
141- run : ls -R docs_build/
142-
143- - name : Deploy to GitHub Pages
152+ - name : Deploy Examples for Colab import
144153 uses : peaceiris/actions-gh-pages@v4
145154 with :
146155 github_token : ${{ secrets.GITHUB_TOKEN }}
147- publish_dir : ./docs_build
148- destination_dir : . # Ensure you deploy to the root of the gh-pages branch
149- publish_branch : gh-pages
156+ publish_dir : ./docs_build/examples
157+ destination_dir : examples
158+ publish_branch : colab-examples
150159 keep_files : false
151160 force_orphan : true
161+
162+ - name : Deploy to GitHub Pages
163+ uses : actions/deploy-pages@v4
0 commit comments