Skip to content

Merge pull request #15 from fabianbormann/release-please--branches--m… #8

Merge pull request #15 from fabianbormann/release-please--branches--m…

Merge pull request #15 from fabianbormann/release-please--branches--m… #8

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 }}