|
1 | 1 | # This is a basic workflow to help you get started with Actions |
2 | | - |
3 | | -name: CI |
| 2 | +name: build pages |
4 | 3 |
|
5 | 4 | # Controls when the workflow will run |
6 | 5 | on: |
7 | 6 | # Triggers the workflow on push or pull request events but only for the "main" branch |
8 | 7 | push: |
9 | | - branches: [ "main" ] |
| 8 | + branches: ["main"] |
10 | 9 |
|
11 | 10 | # Allows you to run this workflow manually from the Actions tab |
12 | 11 | workflow_dispatch: |
13 | 12 |
|
14 | | -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages |
15 | 13 | permissions: |
16 | 14 | contents: read |
17 | 15 | pages: write |
18 | 16 | id-token: write |
19 | 17 |
|
| 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 |
20 | 25 | jobs: |
| 26 | + # This workflow contains a single job called "build" |
21 | 27 | build: |
22 | | - environment: |
23 | | - name: github-pages |
24 | | - url: ${{ steps.deployment.outputs.page_url }} |
25 | 28 | # The type of runner that the job will run on |
26 | 29 | runs-on: ubuntu-latest |
27 | 30 |
|
28 | 31 | # Steps represent a sequence of tasks that will be executed as part of the job |
29 | 32 | steps: |
30 | | - - name: Set up Python 3.11 |
31 | | - uses: actions/setup-python@v2 |
32 | | - with: |
33 | | - python-version: "3.11" |
34 | | - |
35 | 33 | # 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 | + |
48 | 48 | - name: Upload artifact |
49 | | - uses: actions/upload-pages-artifact@v1 |
| 49 | + uses: actions/upload-pages-artifact@v4 |
50 | 50 | 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: |
52 | 60 | - name: Deploy to GitHub Pages |
53 | 61 | id: deployment |
54 | | - uses: actions/deploy-pages@v2 |
55 | | - |
| 62 | + uses: actions/deploy-pages@v4 |
0 commit comments