Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: prod deployments with proper env variables #138

Merged
merged 1 commit into from
Oct 4, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 21 additions & 11 deletions .github/workflows/production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,29 +7,39 @@ name: Deploy Package to Production
description: "A release version to deploy, e.g. v1.0.0"
required: true
default: "v1.0.0"

jobs:
deploy:
name: Deploy
build_and_deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: refs/tags/${{ github.event.inputs.version }}

- name: Download Dist package
uses: dsaltares/fetch-gh-release-asset@master
- name: Setup Node.js
uses: actions/setup-node@v3
with:
version: "tags/${{ github.event.inputs.version }}"
file: "dist.zip"
target: "dist.zip"
token: ${{ secrets.GITHUB_TOKEN }}
node-version: '18'
cache: 'npm'

- name: Install dependencies
run: |
npm ci --force

- name: Setup .env
run: |
echo "WALLET_CONNECT_PROJECT_ID=${{ secrets.WALLET_CONNECT_PROJECT_ID }}" > .env
echo "ANKR_TOKEN=${{ secrets.ANKR_TOKEN }}" >> .env

- name: Unzip Dist package
- name: Build
run: |
unzip dist.zip
npm run generate

- uses: matter-labs/action-hosting-deploy@main
- name: Deploy to Production
uses: matter-labs/action-hosting-deploy@main
with:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
firebaseServiceAccount: "${{ secrets.FIREBASE_SERVICE_ACCOUNT_ZKSYNC_DAPP_WALLET_V2 }}"
Expand Down
Loading