2024-11-06 05:10:01 +00:00
|
|
|
name: Deploy Snowball frontend
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
2024-11-06 08:29:48 +00:00
|
|
|
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
|
|
|
|
|
2024-11-06 05:10:01 +00:00
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [20.x]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Check out repository
|
|
|
|
uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
|
|
|
|
|
|
|
- name: Download yarn
|
|
|
|
run: |
|
|
|
|
curl -fsSL -o /usr/local/bin/yarn https://github.com/yarnpkg/yarn/releases/download/v1.22.21/yarn-1.22.21.js
|
|
|
|
chmod +x /usr/local/bin/yarn
|
|
|
|
|
2024-11-06 06:45:55 +00:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
yarn install
|
|
|
|
|
2024-11-06 05:10:01 +00:00
|
|
|
- name: Set up environment
|
|
|
|
run: |
|
2024-11-06 08:29:48 +00:00
|
|
|
# Create a .env file with the necessary variables
|
|
|
|
echo "REGISTRY_BOND_ID=$REGISTRY_BOND_ID" > packages/deployer/.env
|
|
|
|
echo "DEPLOYER_LRN=$DEPLOYER_LRN" >> packages/deployer/.env
|
|
|
|
echo "AUTHORITY=$AUTHORITY" >> packages/deployer/.env
|
2024-11-06 06:06:02 +00:00
|
|
|
|
2024-11-06 08:29:48 +00:00
|
|
|
# Create a config file with necessary endpoints and secrets
|
2024-11-06 05:10:01 +00:00
|
|
|
cat > packages/deployer/config.yml <<EOF
|
|
|
|
services:
|
|
|
|
registry:
|
|
|
|
rpcEndpoint: https://laconicd-sapo.laconic.com
|
|
|
|
gqlEndpoint: https://laconicd-sapo.laconic.com/api
|
2024-11-06 08:29:48 +00:00
|
|
|
userKey: $REGISTRY_USER_KEY
|
|
|
|
bondId: $REGISTRY_BOND_ID
|
2024-11-06 05:10:01 +00:00
|
|
|
chainId: laconic-testnet-2
|
|
|
|
gasPrice: 0.001alnt
|
|
|
|
EOF
|
|
|
|
|
2024-11-06 08:29:48 +00:00
|
|
|
- name: Run deploy script
|
2024-11-06 05:10:01 +00:00
|
|
|
run: |
|
2024-11-06 06:45:55 +00:00
|
|
|
cd packages/deployer
|
|
|
|
./deploy-frontend.sh
|