-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.98 KB
/
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
48
49
50
51
52
53
54
name: Build and Deploy to GitHub Pages
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
env:
REACT_APP_FIREBASE_API_KEY: ${{ secrets.REACT_APP_FIREBASE_API_KEY }}
REACT_APP_FIREBASE_AUTH_DOMAIN: ${{ secrets.REACT_APP_FIREBASE_AUTH_DOMAIN }}
REACT_APP_FIREBASE_PROJECT_ID: ${{ secrets.REACT_APP_FIREBASE_PROJECT_ID }}
REACT_APP_FIREBASE_STORAGE_BUCKET: ${{ secrets.REACT_APP_FIREBASE_STORAGE_BUCKET }}
REACT_APP_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.REACT_APP_FIREBASE_MESSAGING_SENDER_ID }}
REACT_APP_FIREBASE_APP_ID: ${{ secrets.REACT_APP_FIREBASE_APP_ID }}
REACT_APP_FIREBASE_MEASUREMENT_ID: ${{ secrets.REACT_APP_FIREBASE_MEASUREMENT_ID }}
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'
- name: Install dependencies
run: npm install
- name: Create env.json
run: |
echo '{
"REACT_APP_FIREBASE_API_KEY": "${{ secrets.REACT_APP_FIREBASE_API_KEY }}",
"REACT_APP_FIREBASE_AUTH_DOMAIN": "${{ secrets.REACT_APP_FIREBASE_AUTH_DOMAIN }}",
"REACT_APP_FIREBASE_PROJECT_ID": "${{ secrets.REACT_APP_FIREBASE_PROJECT_ID }}",
"REACT_APP_FIREBASE_STORAGE_BUCKET": "${{ secrets.REACT_APP_FIREBASE_STORAGE_BUCKET }}",
"REACT_APP_FIREBASE_MESSAGING_SENDER_ID": "${{ secrets.REACT_APP_FIREBASE_MESSAGING_SENDER_ID }}",
"REACT_APP_FIREBASE_APP_ID": "${{ secrets.REACT_APP_FIREBASE_APP_ID }}",
"REACT_APP_FIREBASE_MEASUREMENT_ID": "${{ secrets.REACT_APP_FIREBASE_MEASUREMENT_ID }}"
}' > public/env.json
- name: Build project
run: npm run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
cname: dataroom.fx.land