-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (38 loc) · 1.22 KB
/
deploy.yml
File metadata and controls
45 lines (38 loc) · 1.22 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: React-app-deployment
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: mxstatus
env:
NODE_OPTIONS: --openssl-legacy-provider
steps:
- uses: actions/checkout@v4
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
cache: pnpm
cache-dependency-path: mxstatus/pnpm-lock.yaml
- name: Install dependencies
run: pnpm install --frozen-lockfile
- name: Build
env:
CI: false
run: pnpm run build
- name: Deploy react app to github pages
run: |
git config user.name github-actions
git config user.email github-actions@github.com
git --work-tree build add --all
git commit -m "Auto deployment"
git push origin HEAD:gh-pages --force