-
Notifications
You must be signed in to change notification settings - Fork 0
34 lines (28 loc) · 837 Bytes
/
Copy pathdeploy.yml
File metadata and controls
34 lines (28 loc) · 837 Bytes
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
name: Build and push to build branch
on:
push:
branches: [main]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: --openssl-legacy-provider
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"
- name: Install dependencies
run: npm ci
- name: Build production bundle
run: npm run build # or "webpack --mode=production" if no script
- name: Deploy to build branch
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
publish_branch: build
force_orphan: true # optional: cleans the branch history