forked from cerc-io/snowballtools-base
Update workflow to install dependencies
This commit is contained in:
parent
55e83f796f
commit
cc22861890
@ -26,12 +26,16 @@ jobs:
|
||||
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
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
yarn install
|
||||
|
||||
- name: Set up environment
|
||||
run: |
|
||||
# Create a .env file with the necessary environment variables from GitHub secrets
|
||||
echo "REGISTRY_BOND_ID=${{ secrets.REGISTRY_BOND_ID }}" > .env
|
||||
echo "DEPLOYER_LRN=lrn://vaasl-provider/deployers/webapp-deployer-api.apps.vaasl.io" >> .env
|
||||
echo "AUTHORITY=laconic-deploy" >> .env
|
||||
echo "REGISTRY_BOND_ID=${{ secrets.REGISTRY_BOND_ID }}" > packages/deployer/.env
|
||||
echo "DEPLOYER_LRN=lrn://vaasl-provider/deployers/webapp-deployer-api.apps.vaasl.io" >> packages/deployer/.env
|
||||
echo "AUTHORITY=laconic-deploy" >> packages/deployer/.env
|
||||
|
||||
# Create a config file with necessary endpoints and placeholders for secrets
|
||||
cat > packages/deployer/config.yml <<EOF
|
||||
@ -47,4 +51,5 @@ jobs:
|
||||
|
||||
- name: Run Deploy Script
|
||||
run: |
|
||||
packages/deployer/deploy-frontend.sh
|
||||
cd packages/deployer
|
||||
./deploy-frontend.sh
|
||||
|
@ -102,6 +102,9 @@ fi
|
||||
# Get payment address for deployer
|
||||
paymentAddress=$(yarn --silent laconic -c config.yml registry name resolve "$DEPLOYER_LRN" | jq -r '.[0].attributes.paymentAddress')
|
||||
paymentAmount=$(yarn --silent laconic -c config.yml registry name resolve "$DEPLOYER_LRN" | jq -r '.[0].attributes.minimumPayment' | sed 's/alnt//g')
|
||||
|
||||
echo "Paying address: $paymentAddress with amount $paymentAmount..."
|
||||
|
||||
# Pay deployer if paymentAmount is not null
|
||||
if [[ -n "$paymentAmount" && "$paymentAmount" != "null" ]]; then
|
||||
payment=$(yarn --silent laconic -c config.yml registry tokens send --address "$paymentAddress" --type alnt --quantity "$paymentAmount")
|
||||
@ -122,7 +125,7 @@ record:
|
||||
name: deploy-frontend@$PACKAGE_VERSION
|
||||
application: lrn://$AUTHORITY/applications/deploy-frontend@$PACKAGE_VERSION
|
||||
deployer: $DEPLOYER_LRN
|
||||
dns: deploy
|
||||
dns: deploy.laconic.com
|
||||
config:
|
||||
env:
|
||||
LACONIC_HOSTED_CONFIG_server_url: https://deploy-backend.laconic.com
|
||||
@ -133,7 +136,7 @@ record:
|
||||
LACONIC_HOSTED_CONFIG_wallet_connect_id: 63cad7ba97391f63652161f484670e15
|
||||
LACONIC_HOSTED_CONFIG_laconicd_chain_id: laconic-testnet-2
|
||||
meta:
|
||||
note: Added by Snowball @ $CURRENT_DATE_TIME
|
||||
note: Added @ $CURRENT_DATE_TIME
|
||||
repository: "$REPO_URL"
|
||||
repository_ref: $LATEST_HASH
|
||||
payment: $txHash
|
||||
|
@ -126,6 +126,7 @@ record:
|
||||
LACONIC_HOSTED_CONFIG_github_clientid: Ov23liaet4yc0KX0iM1c
|
||||
LACONIC_HOSTED_CONFIG_github_pwa_templaterepo: laconic-templates/test-progressive-web-app
|
||||
LACONIC_HOSTED_CONFIG_github_image_upload_templaterepo: laconic-templates/image-upload-pwa-example
|
||||
LACONIC_HOSTED_CONFIG_github_next_app_templaterepo: laconic-templates/starter.nextjs-react-tailwind
|
||||
LACONIC_HOSTED_CONFIG_wallet_connect_id: 63cad7ba97391f63652161f484670e15
|
||||
LACONIC_HOSTED_CONFIG_laconicd_chain_id: laconic-testnet-2
|
||||
meta:
|
||||
|
Loading…
Reference in New Issue
Block a user