Skip to content

Commit 6059132

Browse files
committed
Adding GHA deployment for the rendered pages
1 parent dd78f3d commit 6059132

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/ci_publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and Publish HTML and deployed_notebooks
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
schedule:
8+
- cron: '0 5 * * 1'
9+
workflow_dispatch:
10+
11+
concurrency:
12+
group: ${{ github.workflow }}-${{ github.ref }}
13+
cancel-in-progress: true
14+
15+
env:
16+
# `BASE_URL` determines, relative to the root of the domain, the URL that your site is served from.
17+
# E.g., if your site lives at `https://mydomain.org/myproject`, set `BASE_URL=/myproject`.
18+
# If, instead, your site lives at the root of the domain, at `https://mydomain.org`, set `BASE_URL=''`.
19+
BASE_URL: /${{ github.event.repository.name }}
20+
21+
jobs:
22+
23+
publish_html:
24+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
25+
name: Publish HTML
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v5
29+
30+
- name: Setup Python
31+
uses: actions/setup-python@v6
32+
with:
33+
python-version: '3.12'
34+
35+
- name: Install dependencies
36+
run: python -m pip install --upgrade tox
37+
38+
- name: Execute notebooks while building HTMLs
39+
run: tox -e py312-buildhtml
40+
41+
- name: Publish
42+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
43+
with:
44+
github_token: ${{ secrets.GITHUB_TOKEN }}
45+
publish_dir: ./_build/html/
46+
commit_message: ${{ github.event.head_commit.message }}

0 commit comments

Comments
 (0)