Skip to content

Merge branch 'develop' #40

Merge branch 'develop'

Merge branch 'develop' #40

name: testnet-deployment
# Controls when the workflow will run
on:
# Triggers the workflow on push events but only for the main branch
push:
branches:
- 'main'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
# get the correct AW role
- name: Configure AWS credentials from Testnet account
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_TESTNET_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_TESTNET_SECRET_KEY }}
role-duration-seconds: 1500
role-to-assume: arn:aws:iam::737954963756:role/github-testnet-deploy-role
aws-region: us-east-1
# make the required env variables available in the JSON format Claudia uses
- name: env
run: |
echo "${{secrets.TESTNET_SERVERCONFIG_JSON_BASE64 }}" | base64 -d > ./src/serverconfig.json
# install packages and run deploy
- id: nvmrc
uses: browniebroke/read-nvmrc-action@v1
- uses: actions/setup-node@v2
with:
node-version: '${{ steps.nvmrc.outputs.node_version }}'
cache: 'yarn'
- run: yarn install
# do testnet deployment
- run: yarn lambda-update