Skip to content

Commit 228d3ec

Browse files
committed
CI: adding publishing workflow
1 parent 1daa0f8 commit 228d3ec

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

.github/workflows/ci_publish.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Publish HTML
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+
jobs:
16+
17+
publish:
18+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
19+
name: Publish HTML
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v4
23+
24+
- name: Setup Python
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: '3.11'
28+
29+
- name: Install dependencies
30+
run: python -m pip install --upgrade tox
31+
32+
- name: Execute notebooks as testing
33+
run: tox -e py311-buildhtml
34+
35+
- name: Publish
36+
uses: peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_dir: ./_build/html/
40+
commit_message: ${{ github.event.head_commit.message }}

0 commit comments

Comments
 (0)