Skip to content

Commit 748d616

Browse files
committed
new action yml
1 parent a8c4991 commit 748d616

1 file changed

Lines changed: 17 additions & 20 deletions

File tree

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,24 @@
11
name: gh-pages
22

3-
on: [push, pull_request, workflow_dispatch]
3+
on:
4+
push:
5+
branches: [gh-pages] # branch to trigger deployment
46

5-
permissions:
6-
contents: write
7+
# Cancel any in-progress job or run
8+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#concurrency
9+
concurrency:
10+
group: ${{ github.ref }}
11+
cancel-in-progress: true
712

813
jobs:
9-
docs:
14+
pages:
1015
runs-on: ubuntu-latest
1116
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-python@v5
14-
- name: Install dependencies
15-
run: |
16-
pip install sphinx sphinx_rtd_theme myst_parser
17-
- name: Sphinx build
18-
run: |
19-
sphinx-build docs _build
20-
- name: Deploy to GitHub Pages
21-
uses: peaceiris/actions-gh-pages@v3
22-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
23-
with:
24-
publish_branch: gh-pages
25-
github_token: ${{ secrets.GITHUB_TOKEN }}
26-
publish_dir: _build/
27-
force_orphan: true
17+
- id: deployment
18+
uses: sphinx-notes/pages@v3
19+
with:
20+
publish: false
21+
- uses: peaceiris/actions-gh-pages@v3
22+
with:
23+
github_token: ${{ secrets.GITHUB_TOKEN }}
24+
publish_dir: ${{ steps.deployment.outputs.artifact }}

0 commit comments

Comments
 (0)