Add a CI workflow to deploy frontend #35

Merged
prathamesh merged 5 commits from deep-stack/snowballtools-base:ag-frontend-ci into main 2024-11-06 09:20:02 +00:00
Showing only changes of commit a32d0a6e9a - Show all commits

View File

@ -5,6 +5,12 @@ on:
branches: branches:
- main - main
env:
REGISTRY_USER_KEY: ${{ secrets.REGISTRY_USER_KEY }}
REGISTRY_BOND_ID: ${{ secrets.REGISTRY_BOND_ID }}
DEPLOYER_LRN: lrn://vaasl-provider/deployers/webapp-deployer-api.apps.vaasl.io
AUTHORITY: laconic-deploy
jobs: jobs:
deploy: deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -32,24 +38,24 @@ jobs:
- name: Set up environment - name: Set up environment
run: | run: |
# Create a .env file with the necessary environment variables from GitHub secrets # Create a .env file with the necessary variables
echo "REGISTRY_BOND_ID=${{ secrets.REGISTRY_BOND_ID }}" > packages/deployer/.env echo "REGISTRY_BOND_ID=$REGISTRY_BOND_ID" > packages/deployer/.env
echo "DEPLOYER_LRN=lrn://vaasl-provider/deployers/webapp-deployer-api.apps.vaasl.io" >> packages/deployer/.env echo "DEPLOYER_LRN=$DEPLOYER_LRN" >> packages/deployer/.env
echo "AUTHORITY=laconic-deploy" >> packages/deployer/.env echo "AUTHORITY=$AUTHORITY" >> packages/deployer/.env
# Create a config file with necessary endpoints and placeholders for secrets # Create a config file with necessary endpoints and secrets
cat > packages/deployer/config.yml <<EOF cat > packages/deployer/config.yml <<EOF
services: services:
registry: registry:
rpcEndpoint: https://laconicd-sapo.laconic.com rpcEndpoint: https://laconicd-sapo.laconic.com
gqlEndpoint: https://laconicd-sapo.laconic.com/api gqlEndpoint: https://laconicd-sapo.laconic.com/api
userKey: ${{ secrets.REGISTRY_USER_KEY }} userKey: $REGISTRY_USER_KEY
bondId: ${{ secrets.REGISTRY_BOND_ID }} bondId: $REGISTRY_BOND_ID
chainId: laconic-testnet-2 chainId: laconic-testnet-2
gasPrice: 0.001alnt gasPrice: 0.001alnt
EOF EOF
- name: Run Deploy Script - name: Run deploy script
run: | run: |
cd packages/deployer cd packages/deployer
./deploy-frontend.sh ./deploy-frontend.sh