Skip to content

Commit

Permalink
update workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Alleria1809 committed Jun 28, 2024
1 parent 686fc9c commit 32b1b2b
Showing 1 changed file with 17 additions and 6 deletions.
23 changes: 17 additions & 6 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ on:
- xiaoyi_doc
workflow_dispatch:

permissions: # This sets permissions for all jobs
contents: write
actions: read

jobs:
docs:
runs-on: ubuntu-latest
Expand All @@ -14,15 +18,22 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: '3.11'

- name: List docs directory
run: ls -l ./docs
- name: Display requirements.txt
run: cat ./docs/requirements.txt
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r ./docs/requirements.txt
pip freeze
- name: Sphinx build
run: |
# Building the documentation in the specified directory
sphinx-build -b html docs/source/ ./docs/build/
# Optionally, list output files for debugging
ls -l ./docs/build/
sphinx-build -b html docs/source/ docs/build/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/xiaoyi_doc' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/build/
force_orphan: true

0 comments on commit 32b1b2b

Please sign in to comment.