-
Notifications
You must be signed in to change notification settings - Fork 9
58 lines (52 loc) · 1.48 KB
/
deploy-prod.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
55
56
57
58
name: Production Build and Deploy
on:
push:
branches: [ main ]
#paths-ignore:
#- '.github/workflows/**'
#- '**.md'
env:
URL: app.openq.dev
jobs:
build:
runs-on: ubuntu-latest
environment:
name: production
url: https://${{ env.URL }}
steps:
- name: Setup Node.js
uses: actions/setup-node@v2
# https://github.com/actions/checkout#push-a-commit-using-the-built-in-token
- name: Set GitHub Actions as Commit Author
run: |
git config --global user.name github-actions
git config --global user.email [email protected]
- name: Checkout Repo
uses: actions/checkout@v2
with:
path: 'build'
- name: Build
run: |
cd build
yarn
export API_URL=https://octobay.uber.space/v1
export GITHUB_CLIENT_ID=79c2b8f305ad223cfb5e
export OCTOBAY_ADDRESS=0xEC1dA9EeE346A67C121E4fce746C64b4e31b61A4
export CHAIN_ID=42
yarn app:generate
cd ..
- name: Checkout Prod Target
uses: actions/checkout@v2
with:
repository: openqdev/app-prod
path: 'deploy'
token: ${{ secrets.PAT }}
- name: Push files to target
run: |
cp -r build/dist/* deploy
cd deploy
touch .nojekyll
echo ${{ env.URL }} > CNAME
git add .
git commit -m $GITHUB_SHA
git push