-
Notifications
You must be signed in to change notification settings - Fork 19
43 lines (35 loc) · 1005 Bytes
/
ci_publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Publish HTML
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: '0 5 * * 1'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
publish:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
name: Publish HTML
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
- name: Install dependencies
run: python -m pip install --upgrade tox
- name: Execute notebooks as testing
run: tox -e py311-buildhtml
- name: Publish
uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 # v3.9.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_build/html/
commit_message: ${{ github.event.head_commit.message }}