-
Notifications
You must be signed in to change notification settings - Fork 7
47 lines (38 loc) · 1.19 KB
/
build-and-deploy.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
47
name: CI/CD
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.9.0]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Nodejs
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Set env var
run: |
cp .env.template .env
sed -i "s/API_KEY_HERE/${{ secrets.API_KEY }}/g" .env
sed -i "s/PROJECT_ID_HERE/${{ secrets.PROJECT_ID }}/g" .env
sed -i "s/MESSAGING_SENDER_ID_HERE/${{ secrets.MESSAGING_SENDER_ID }}/g" .env
sed -i "s/APP_ID_HERE/${{ secrets.APP_ID }}/g" .env
sed -i "s/MEASUREMENT_ID_HERE/${{ secrets.MEASUREMENT_ID }}/g" .env
- name: Build
run: |
npm ci
npm run build
touch out/.nojekyll
- name: Deploy
uses: JamesIves/[email protected]
with:
github_token: ${{ secrets.ACTIONS_DEPLOY_ACCESS_TOKEN }}
branch: gh-pages
folder: out