-
-
Notifications
You must be signed in to change notification settings - Fork 672
49 lines (46 loc) · 1.42 KB
/
docs-pr.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
name: Docs PR
on:
pull_request_target:
branches: [ '**' ]
paths:
- 'docs/**'
concurrency:
group: pages
cancel-in-progress: true
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
deployments: write
steps:
- uses: actions/checkout@v4
with:
ref: "${{ github.event.pull_request.merge_commit_sha }}"
- uses: actions/setup-python@v5
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install -r requirements.txt
working-directory: docs
# - run: mkdocs build --verbose --strict
- run: mkdocs build --verbose
working-directory: docs
- uses: actions/upload-pages-artifact@v3
with:
path: 'site'
- uses: topi314/pages-action@989c0bd3a707c425c05f802dd9984387be67e82b
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
directory: site
branch: pr-${{ github.event.pull_request.number }}
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
deploymentRef: ${{ github.event.pull_request.merge_commit_sha }}