Update workflow to use GitHub Pages Actions deployment

This commit is contained in:
Martin
2025-11-21 22:26:47 +01:00
parent 87edbbfa2b
commit 3315624fcf

View File

@@ -4,17 +4,18 @@ on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master
permissions:
contents: write
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
@@ -34,16 +35,26 @@ jobs:
${{ runner.os }}-pip-
- name: Install dependencies
run: |
pip install mkdocs-material
run: pip install mkdocs-material
- name: Build site
run: mkdocs build --strict
- name: Deploy to GitHub Pages
if: github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master')
uses: peaceiris/actions-gh-pages@v3
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
cname: false
path: ./site
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4