-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (43 loc) · 1.31 KB
/
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
38
39
40
41
42
43
44
45
46
# Simple workflow for deploying static content to GitHub Pages
name: Deploy frontend
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
paths:
- frontend/energy-savers-spa/**
- '!backend/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Single deploy job since we're just deploying
deploy:
runs-on: ubuntu-18.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js environment
uses: actions/[email protected]
with:
node-version: 16.13
- name: npm ci
working-directory: ./frontend/energy-savers-spa
run: npm ci
- name: Build
working-directory: ./frontend/energy-savers-spa
run: npm run build
env:
# Not actually a secret :)
REACT_APP_API_URL: ${{ secrets.REACT_APP_API_URL }}
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './frontend/energy-savers-spa/build'
production-deploy: 'true'
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_ACCESS_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}