Skip to content

Commit 30539cd

Browse files
author
Louis Nicolas Stenger
committed
Add Github Workflow to publish on Pages
The workflow is lightly adapted from the one suggested in theSphinx documentation [1]. It builds and pushes the website to the "gh-pages" branch which can then be published from the repository's settings [2]. A push event to "master" triggers the workflow. [3] [1] https://www.sphinx-doc.org/en/master/tutorial/deploying.html#id5 [2] https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-from-a-branch [3] https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#push
1 parent 50381d6 commit 30539cd

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/sphinx.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: "Sphinx: Build Fortran90.org"
2+
3+
on:
4+
push:
5+
branches:
6+
- "master"
7+
8+
9+
permissions:
10+
contents: write
11+
id-token: write
12+
13+
jobs:
14+
build:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v4
18+
- name: Build HTML
19+
uses: ammaraskar/sphinx-action@master
20+
with:
21+
docs-folder: "./"
22+
- name: Upload artifacts
23+
uses: actions/upload-artifact@v4
24+
with:
25+
name: html-docs
26+
path: _build/html/
27+
- name: Deploy
28+
uses: peaceiris/actions-gh-pages@v4
29+
if: github.ref == 'refs/heads/master'
30+
with:
31+
github_token: ${{ secrets.GITHUB_TOKEN }}
32+
publish_dir: _build/html

0 commit comments

Comments
 (0)