Skip to content

[course] 日常答同学问 #37

[course] 日常答同学问

[course] 日常答同学问 #37

Workflow file for this run

# https://squidfunk.github.io/mkdocs-material/publishing-your-site/#with-github-actions
# https://www.mkdocs.org/user-guide/deploying-your-docs/#other-providers
# https://github.com/actions/starter-workflows/blob/main/pages/
name: deploy
on:
push:
branches:
- main
paths-ignore:
- '.vscode/**'
- '.github/**'
- 'scripts/**'
- '.pre-commit-config.yaml'
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # RSS plugin needs all history
- uses: actions/setup-python@v5
with:
python-version: '3.11'
cache: pip
cache-dependency-path: justfile
- uses: extractions/setup-just@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: ts-graphviz/setup-graphviz@v2
- run: just bootstrap
- run: just build
- uses: actions/upload-pages-artifact@v3
with:
path: site/
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/deploy-pages@v4
id: deployment