-
Notifications
You must be signed in to change notification settings - Fork 101
37 lines (37 loc) · 1.04 KB
/
build-frontend.yml
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
name: Frontend build
on:
push:
branches: [frontend-release]
workflow_dispatch:
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install npm
uses: actions/setup-node@v3
with:
node-version: 18.15
- name: Install packages and run tests
working-directory: frontend
run: |
npm ci
npm run test
- name: Build frontend
working-directory: frontend
run: |
npx next build
npx next export
env:
NEXT_PUBLIC_GA_MEASUREMENT_ID: ${{ secrets.NEXT_PUBLIC_GA_MEASUREMENT_ID }}
- name: Publish frontend to GitHub Pages repo
uses: dmnemec/copy_file_to_another_repo_action@main
env:
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source_file: "frontend/out/."
destination_repo: "mpcautofill/mpcautofill.github.io"
user_email: "[email protected]"
user_name: "chilli-axe"