-
Notifications
You must be signed in to change notification settings - Fork 5
46 lines (39 loc) · 1.52 KB
/
deploy-preprod.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
name: Deploy to Firebase Hosting for Preprod Network
on:
push:
branches: ['main']
pull_request:
branches: ['main']
workflow_dispatch:
jobs:
deploy:
if: "github.event_name == 'workflow_dispatch' || contains(github.event.head_commit.message, 'release-please--branches--main')"
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v2
- name: 🦾 Install jq
run: sudo apt-get install jq
- name: 🫡 Setup node
uses: actions/setup-node@v1
with:
node-version: 16
- name: 📝 Set version as environment variable
run: |
echo 'VITE_VERSION=$npm_package_version' > .env
echo 'VITE_NETWORK=preprod' >> .env
echo 'VITE_PREPROD_URL=https://preprod.walkinwallet.com' >> .env
echo 'VITE_PREVIEW_URL=https://preview.walkinwallet.com' >> .env
echo 'VITE_MAINNET_URL=https://walkinwallet.com' >> .env
echo 'VITE_KOIOS_API_TOKEN=${{ secrets.KOIOS_API_TOKEN }}' >> .env
- name: 🔥 Edit firebase.json
run: |
cat firebase.json | jq '.hosting.site = "preprod-walkinwallet"' > tmp && mv tmp firebase.json
- name: 🔨 Download dependencies and build hosting
run: npm ci && npm run build
- name: 🚀 Deploy to Firebase hosting
uses: w9jds/firebase-action@master
with:
args: deploy --only hosting:preprod-walkinwallet
env:
GCP_SA_KEY: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_WALKINWALLET }}