add lock #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: GitHub Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: windows-latest | |
permissions: | |
contents: write | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
steps: | |
- uses: actions/checkout@v5 | |
- name: "Set up Python" | |
uses: actions/setup-python@v6 | |
with: | |
python-version-file: ".python-version" | |
- name: Install uv | |
uses: astral-sh/setup-uv@v6 | |
# - name: Set up Python UV (slower?) | |
# run: uv python install | |
- name: Install the project | |
run: uv sync --locked --all-extras --dev | |
- name: Build Sphinx Documentation | |
run: | | |
sphinx-build -b html ./docs/source/ ./docs/build/html | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v4 | |
if: github.ref == 'refs/heads/main' | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/build/html | |
- name: Copy index.rst to README.rst | |
run: cp docs/source/index.rst README.rst | |
# | |
# - name: Build Sphinx Documentation | |
# run: | | |
# sphinx-build -b html ./docs/_source/ ./docs/_build/html | |
# | |
## - name: Rename README.html to index.html | |
## run: | | |
## cp ./build/html/README.html ./build/html/index.html | |
# | |
# - name: Deploy to GitHub Pages | |
# uses: peaceiris/actions-gh-pages@v4 | |
# if: github.ref == 'refs/heads/main' | |
# with: | |
## github_token: ${{ secrets.GITHUB_TOKEN }} | |
# deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} | |
# publish_dir: ./build/html | |