[CI/CD] Setup complete workflow
This commit is contained in:
36
.github/workflows/deploy-doc.yml
vendored
Normal file
36
.github/workflows/deploy-doc.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
name: "Sphinx: Render docs"
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
persist-credentials: false
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: '3.10'
|
||||
- name: Install uv
|
||||
run: pip install uv
|
||||
- name: Install docs dependencies
|
||||
run: uv pip install --system -e ".[docs]"
|
||||
- name: Build HTML
|
||||
run: |
|
||||
cd docs
|
||||
make html
|
||||
- name: Upload artifacts
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: html-docs
|
||||
path: docs/build/html/
|
||||
- name: Deploy
|
||||
uses: peaceiris/actions-gh-pages@v3
|
||||
if: github.ref == 'refs/heads/main'
|
||||
with:
|
||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||
publish_dir: docs/build/html/
|
||||
Reference in New Issue
Block a user