-
Notifications
You must be signed in to change notification settings - Fork 5
39 lines (34 loc) · 1.26 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
name: Deploy to Firebase Hosting
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: 🫡 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=mainnet' >> .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: 🔨 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
env:
GCP_SA_KEY: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_WALKINWALLET }}