Skip to content

Commit

Permalink
feat: Add workflow to publish docs site to GH Pages. (#119)
Browse files Browse the repository at this point in the history
  • Loading branch information
haydenroche5 authored Nov 16, 2023
1 parent bdd8f2c commit bf854c3
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish_docs_site.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Publish note-c docs site

on:
push:
branches: [ master ]
workflow_dispatch:

permissions:
contents: write

jobs:
publish_docs_site:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3

- name: Install Python dependencies
run: |
pip install sphinx sphinx_rtd_theme breathe
- name: Install other dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake doxygen
- name: Build docs site
# The TZ=UTC thing is a workaround for this problem:
# https://github.com/nektos/act/issues/1853
run: |
TZ=UTC ./scripts/build_docs.sh
- name: Deploy docs site to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: build/docs/
force_orphan: true

0 comments on commit bf854c3

Please sign in to comment.