Skip to content

Commit

Permalink
New CI file
Browse files Browse the repository at this point in the history
  • Loading branch information
wavy-cat committed Aug 29, 2024
1 parent a1b17c5 commit 6569cb6
Showing 1 changed file with 26 additions and 24 deletions.
50 changes: 26 additions & 24 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,36 @@
name: Docs
name: Deploy Docs

on:
push:
branches:
- main
- docs

permissions:
contents: write

jobs:
docs-gen:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
pip install -r docs/requirements.txt
- name: Sphinx build
run: |
sphinx-build docs/_build
- name: Deploy docs
uses: peaceiris/actions-gh-pages@v4
with:
allow_empty_commit: true
personal_token: ${{ secrets.DEPLOY_TOKEN }}
publish_branch: gh-pages
publish_dir: docs/_build/
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install sphinx sphinx-immaterial
- name: Build the docs
run: |
cd docs
make html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html

0 comments on commit 6569cb6

Please sign in to comment.