Skip to content

Commit 1a55807

Browse files
committed
update workflow for pages
1 parent ae4d630 commit 1a55807

1 file changed

Lines changed: 35 additions & 28 deletions

File tree

Lines changed: 35 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,62 @@
11
# This is a basic workflow to help you get started with Actions
2-
3-
name: CI
2+
name: build pages
43

54
# Controls when the workflow will run
65
on:
76
# Triggers the workflow on push or pull request events but only for the "main" branch
87
push:
9-
branches: [ "main" ]
8+
branches: ["main"]
109

1110
# Allows you to run this workflow manually from the Actions tab
1211
workflow_dispatch:
1312

14-
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1513
permissions:
1614
contents: read
1715
pages: write
1816
id-token: write
1917

18+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: false
23+
24+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2025
jobs:
26+
# This workflow contains a single job called "build"
2127
build:
22-
environment:
23-
name: github-pages
24-
url: ${{ steps.deployment.outputs.page_url }}
2528
# The type of runner that the job will run on
2629
runs-on: ubuntu-latest
2730

2831
# Steps represent a sequence of tasks that will be executed as part of the job
2932
steps:
30-
- name: Set up Python 3.11
31-
uses: actions/setup-python@v2
32-
with:
33-
python-version: "3.11"
34-
3533
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
36-
- uses: actions/checkout@v3
37-
38-
# Runs a single command using the runners shell
39-
- name: Install
40-
run: |
41-
pip install poetry
42-
poetry install
43-
44-
# Runs a set of commands using the runners shell
45-
- name: Generate site
46-
run: poetry run mkdocs build
47-
34+
- uses: actions/checkout@v4
35+
36+
- name: Install uv
37+
uses: astral-sh/setup-uv@v6
38+
39+
- name: Install dependencies
40+
run: uv sync
41+
42+
- name: Run MkDocs
43+
run: uv run mkdocs build
44+
45+
- name: Configure GitHub Pages
46+
uses: actions/configure-pages@v5
47+
4848
- name: Upload artifact
49-
uses: actions/upload-pages-artifact@v1
49+
uses: actions/upload-pages-artifact@v4
5050
with:
51-
path: 'site'
51+
path: "site"
52+
53+
deploy:
54+
environment:
55+
name: github-pages
56+
url: ${{ steps.deployment.outputs.page_url }}
57+
runs-on: ubuntu-latest
58+
needs: build
59+
steps:
5260
- name: Deploy to GitHub Pages
5361
id: deployment
54-
uses: actions/deploy-pages@v2
55-
62+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)