-
-
Notifications
You must be signed in to change notification settings - Fork 242
45 lines (38 loc) · 1.16 KB
/
deploy.yml
File metadata and controls
45 lines (38 loc) · 1.16 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
name: Deploy
# on push to main deploy (as self-hosted build) to github pages
on:
push:
branches:
- main
env:
NODE_VERSION: 24.x
jobs:
deploy:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max_old_space_size=4096"
steps:
- name: Generate Github Token for CI Bot
uses: actions/create-github-app-token@v1
id: generate-token
with:
app-id: ${{ secrets.CI_APP_ID }}
private-key: ${{ secrets.CI_APP_PRIVATE_KEY }}
- name: Checkout code
uses: actions/checkout@v4
with:
token: ${{ steps.generate-token.outputs.token }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}
cache: "npm"
cache-dependency-path: "**/package-lock.json"
- name: Install dependencies
run: npm ci
- name: Deploy
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${{github.repository}}.git
npm run deploy -- -u "github-actions-bot <support+actions@github.com>"
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}