Skip to content

Commit 17e668c

Browse files
author
peer-open-source
committed
add workflow
1 parent 540f690 commit 17e668c

File tree

1 file changed

+53
-0
lines changed

1 file changed

+53
-0
lines changed

.github/workflows/sphinx.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Sphinx build
2+
3+
on:
4+
push:
5+
branches: [master]
6+
pull_request:
7+
branches: [master]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
15+
- name: Build HTML
16+
uses: ammaraskar/[email protected]
17+
with:
18+
docs-folder: "."
19+
20+
21+
- name: Upload static files as artifact
22+
id: deployment
23+
uses: actions/upload-pages-artifact@v3
24+
with:
25+
path: build/html/
26+
27+
28+
# - name: Deploy
29+
# uses: peaceiris/actions-gh-pages@v3
30+
# if: github.ref == 'refs/heads/main'
31+
# with:
32+
# github_token: ${{ secrets.GITHUB_TOKEN }}
33+
# publish_dir: _build/html
34+
#
35+
# Deployment job
36+
deploy:
37+
needs: build
38+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
39+
runs-on: ubuntu-latest
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
# Set permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
44+
permissions:
45+
contents: read
46+
pages: write
47+
id-token: write
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
if: github.ref == 'refs/heads/master'
52+
uses: actions/deploy-pages@v4
53+

0 commit comments

Comments
 (0)