-
-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (54 loc) · 1.75 KB
/
publish_pages.yaml
File metadata and controls
67 lines (54 loc) · 1.75 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
63
64
65
66
67
---
name: Publish Pages
on:
workflow_dispatch:
push:
branches: [main]
paths: [src/**, package.json, .github/workflows/publish_pages.yaml]
jobs:
Pages:
runs-on: [ubuntu-24.04]
permissions:
contents: read # Required to checkout repository.
id-token: write # Required to authenticate via OIDC.
pages: write # Required to publish GitHub Pages.
concurrency:
group: github-pages
cancel-in-progress: true
environment:
name: github-pages
url: ${{ steps.publish.outputs.page_url }}
env:
NODE_ENV: production
BASE_URL: /${{ github.event.repository.name }}/
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
cache: npm
node-version: 23
- name: Cache Node modules
id: cache
uses: actions/cache@27d5ce7f107fe9357f9df03efb73ab90386fccae # v5.0.5
with:
key: node-modules-${{ hashFiles('package-lock.json') }}
path: node_modules
- name: Install Node modules
if: steps.cache.outputs.cache-hit != 'true'
run: npm clean-install
- name: Build GitHub Pages
run: npm run build
- name: Upload GitHub Pages
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: dist/public/
retention-days: 1
- name: Publish GitHub Pages
id: publish
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0
with:
preview: true