-
Notifications
You must be signed in to change notification settings - Fork 97
50 lines (43 loc) · 1.21 KB
/
check-build-pr.yaml
File metadata and controls
50 lines (43 loc) · 1.21 KB
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
# .github/workflows/build-pr.yml
name: 1 - Check and Build Web Page PR
on:
pull_request:
branches: ["main"]
jobs:
linter:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
contents: read
deployments: write
pull-requests: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v6
with:
python-version: 3.12
cache: pip
- name: pre-commit
uses: pre-commit/action@v3.0.1
with:
extra_args: "--from-ref origin/main --to-ref HEAD"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Build docs
run: mkdocs build
- name: Upload Static Site Artifact
uses: actions/upload-artifact@v4
with:
name: preview-site
path: site/
# NEW: Save the PR number to a file
- name: Save PR number
run: echo ${{ github.event.pull_request.number }} > pr-number.txt
# NEW: Upload the PR number as its own artifact
- name: Upload PR Number Artifact
uses: actions/upload-artifact@v4
with:
name: pr-metadata
path: pr-number.txt