File tree Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Expand file tree Collapse file tree 1 file changed +22
-3
lines changed Original file line number Diff line number Diff line change 1
- name : Publish HTML
1
+ name : Build and Publish HTML and deployed_notebooks
2
2
3
3
on :
4
4
push :
@@ -14,7 +14,7 @@ concurrency:
14
14
15
15
jobs :
16
16
17
- publish :
17
+ publish_html :
18
18
if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
19
19
name : Publish HTML
20
20
runs-on : ubuntu-latest
29
29
- name : Install dependencies
30
30
run : python -m pip install --upgrade tox
31
31
32
- - name : Execute notebooks as testing
32
+ - name : Execute notebooks while building HTMLs
33
33
run : tox -e py311-buildhtml
34
34
35
35
- name : Publish
38
38
github_token : ${{ secrets.GITHUB_TOKEN }}
39
39
publish_dir : ./_build/html/
40
40
commit_message : ${{ github.event.head_commit.message }}
41
+
42
+ deploy_notebooks :
43
+ if : ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
44
+ name : Deploy deployed_notebook branch
45
+ runs-on : ubuntu-latest
46
+ needs : publish_html
47
+ steps :
48
+ - uses : actions/checkout@v4
49
+
50
+ - name : Deploy to deployed_notebooks branch
51
+ run : |
52
+ git config user.name "github-actions[bot]"
53
+ git config user.email "github-actions[bot]@users.noreply.github.com"
54
+ gith=$(git rev-parse HEAD)
55
+ git checkout --orphan deployed_notebooks
56
+ git rm --cached -r .
57
+ git add --pathspec-from-file=deployed_notebooks_manifest.in --force
58
+ git commit -m "Deploy notebooks for commit ${gith}"
59
+ git push origin deployed_notebooks --force
You can’t perform that action at this time.
0 commit comments