-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Stefan Charsley <[email protected]>
- Loading branch information
1 parent
37ac692
commit 674dc99
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Docs | ||
|
||
on: | ||
push: | ||
paths: | ||
- 'Source/Docs/**' | ||
pull_request: | ||
paths: | ||
- 'Source/Docs/**' | ||
|
||
permissions: | ||
contents: write | ||
|
||
env: | ||
BUILD_VERSION: 2.5.1.${{ github.run_number }} | ||
|
||
jobs: | ||
|
||
generate-docs: | ||
name: Generate Documentation | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 15 | ||
steps: | ||
- name: Set python3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.11' | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Update package repository | ||
run: sudo apt-get -y -o Acquire::Check-Valid-Until=false update | ||
- name: Install Graphviz | ||
run: sudo apt-get install -y graphviz | ||
- name: Install Sphinx dependencies | ||
run: pip3 install sphinx sphinxcontrib.httpdomain sphinx-prompt sphinx_rtd_theme sphinx-tabs | ||
- name: Generate HTML website | ||
run: sphinx-build -b html Source/Docs sphinx-docs | ||
- name: Copy CNAME file | ||
run: cp Source/Docs/CNAME sphinx-docs/ | ||
- name: Copy .nojekyll file | ||
run: cp Source/Docs/.nojekyll sphinx-docs/ | ||
- name: Deploy to GitHub Pages | ||
if: github.event_name == 'push' && github.repository == 'mosa/MOSA-Project' && github.ref == 'refs/heads/master' | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: sphinx-docs | ||
branch: docs |