Repository navigation
62 lines (56 loc) · 1.92 KB
/
Copy pathdeploy.yml
File metadata and controls
62 lines (56 loc) · 1.92 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
51
52
53
54
55
56
57
58
59
60
61
62
name: Deploy
# Builds the site and publishes it with GitHub Pages.
# Runs on every push to main and on demand.
on:
push:
branches: [main]
workflow_dispatch:
permissions: {}
concurrency:
group: pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 45
permissions:
contents: read
pages: read # configure-pages reads the Pages settings
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
ref: main
fetch-depth: 0
persist-credentials: false
- uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with:
node-version-file: .nvmrc
cache: npm
- run: npm ci
# Social images are rendered once and reused while the page content is unchanged. The deploy
# has its own cache key prefix, so it only restores images that an earlier deploy rendered,
# never ones saved by pull request or other workflow runs.
- uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: .cache/og
key: og-deploy-${{ hashFiles('scripts/og.js', 'assets/fonts/*') }}-${{ github.run_id }}-${{ github.run_attempt }}
restore-keys: |
og-deploy-${{ hashFiles('scripts/og.js', 'assets/fonts/*') }}-
- run: npm test
- uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
- uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3.0.1
with:
path: _site
deploy:
needs: build
runs-on: ubuntu-latest
timeout-minutes: 15
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5