Skip to content

Commit

Permalink
🐎 ci: Add workflow build docs
Browse files Browse the repository at this point in the history
  • Loading branch information
caoccao committed Jul 23, 2024
1 parent aff3e40 commit 1ab73fd
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 3 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Simple workflow for deploying static content to GitHub Pages
name: Build Docs

on:
workflow_dispatch:
push:
branches:
- main
paths:
- "**"

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Build Docs
run: |
cd docs
sudo apt-get install -y python3-sphinx
pip3 install -r requirements.txt
sphinx-build -M html ./ ./build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: 'docs/build'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
6 changes: 3 additions & 3 deletions docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Pygments==2.16.1
furo==2023.9.10
sphinx==7.2.6
Pygments==2.18.0
furo==2024.7.18
sphinx==7.4.7
sphinx_inline_tabs==2023.4.21

0 comments on commit 1ab73fd

Please sign in to comment.