Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: separate docs generation from builds #1187

Merged
merged 4 commits into from
Jan 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 5 additions & 33 deletions .github/workflows/builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,11 @@ name: Builds

on:
push:
paths-ignore:
- 'Source/Docs/**'
pull_request:
paths-ignore:
- 'Source/Docs/**'

permissions:
contents: write
Expand Down Expand Up @@ -70,7 +74,7 @@ jobs:

windows-build-packaging:
name: Windows Build Packaging
needs: [windows-build, linux-build, macos-build, generate-docs, windows-unit-testing, linux-unit-testing, macos-unit-testing, windows-demo-testing, linux-demo-testing, macos-demo-testing]
needs: [windows-build, linux-build, macos-build, windows-unit-testing, linux-unit-testing, macos-unit-testing, windows-demo-testing, linux-demo-testing, macos-demo-testing]
runs-on: windows-latest
timeout-minutes: 15
if: github.event_name == 'push' && github.repository == 'mosa/MOSA-Project' && github.ref == 'refs/heads/master'
Expand Down Expand Up @@ -165,38 +169,6 @@ jobs:
name: macos-build-artifact
path: bin

generate-docs:
name: Generate Documentation
runs-on: ubuntu-latest
timeout-minutes: 15
if: github.event_name == 'push' && github.repository == 'mosa/MOSA-Project' && github.ref == 'refs/heads/master'
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
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: sphinx-docs
branch: docs

windows-unit-testing:
strategy:
matrix:
Expand Down
49 changes: 49 additions & 0 deletions .github/workflows/docs.yml
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
Loading