-
Notifications
You must be signed in to change notification settings - Fork 0
75 lines (63 loc) · 2.3 KB
/
Copy pathmain.yml
File metadata and controls
75 lines (63 loc) · 2.3 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
68
69
70
71
72
73
74
75
name: Build and Deploy
on:
push:
branches:
- main
pull_request: {}
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Setup Node ✨
uses: actions/setup-node@v4
with:
# Pin to a known-good patch for Node's experimental unit coverage output.
node-version: 22.12.0
cache: npm
- name: Install Dependencies 🔧
run: npm ci --include=optional
- name: Ensure Rollup Linux binary is present
run: |
node -e "require.resolve('@rollup/rollup-linux-x64-gnu')" || npm i --no-save @rollup/rollup-linux-x64-gnu@$(node -p "require('./node_modules/rollup/package.json').optionalDependencies['@rollup/rollup-linux-x64-gnu'] || require('./node_modules/rollup/package.json').version")
- name: Build 🔧
run: npm run build:highmem
- name: Post Build Actions 🛠️
run: npm run github-post-build
env:
NODE_ENV: production
deploy:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
environment: github-pages
steps:
- name: Checkout 🛎️
uses: actions/checkout@v4
- name: Setup Node ✨
uses: actions/setup-node@v4
with:
# Pin to a known-good patch for Node's experimental unit coverage output.
node-version: 22.12.0
cache: npm
- name: Install Dependencies 🔧
run: npm ci --include=optional
- name: Ensure Rollup Linux binary is present
run: |
node -e "require.resolve('@rollup/rollup-linux-x64-gnu')" || npm i --no-save @rollup/rollup-linux-x64-gnu@$(node -p "require('./node_modules/rollup/package.json').optionalDependencies['@rollup/rollup-linux-x64-gnu'] || require('./node_modules/rollup/package.json').version")
- name: Build 🔧
run: npm run build:highmem
- name: Post Build Actions 🛠️
run: npm run github-post-build
env:
NODE_ENV: production
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@releases/v4
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: pages
FOLDER: dist
CLEAN: true