-
-
Notifications
You must be signed in to change notification settings - Fork 9
75 lines (71 loc) · 1.82 KB
/
documentation.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
name: Documentation
on:
workflow_dispatch:
push:
branches:
- master
env:
PYTHON_VERSION: '3.12'
concurrency:
group: documentation
cancel-in-progress: false
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Poetry
run: |
pipx install poetry
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}
cache: poetry
- name: Set up Poetry environment
env:
PYTHON_VERSION: ${{ env.PYTHON_VERSION }}
run: |
poetry env use ${PYTHON_VERSION}
- name: Install Python dependencies
run: |
pip install poetry
make install
- name: Get Playwright version
run: |
echo "PLAYWRIGHT_VERSION=$(poetry run playwright --version | cut -d ' ' -f 2)" >> $GITHUB_ENV
- id: playwright
name: Cache playwright binaries
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: playwright-${{ env.PLAYWRIGHT_VERSION }}
- name: Set up Playwright
if: steps.playwright.outputs.cache-hit != 'true'
run: |
make browser
- name: Build documentation
run: |
make build
- name: Upload pages artifacts
uses: actions/upload-pages-artifact@v3
with:
path: dist
deploy:
name: Deploy
needs: build
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}