Rename "frontend-publish.sh" to "publish.sh" #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Staking Portal CICD | |
on: [push, workflow_dispatch] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [20] | |
name: Static Build - nodeJS v${{ matrix.node-version }} | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Setup node v${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Static Build - node v${{ matrix.node-version }} | |
run: .github/workflows/build.sh | |
- name: Upload Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist-node-${{ matrix.node-version }} | |
path: dist.tar.gz | |
aws: | |
name: AWS Authentication | |
runs-on: ubuntu-latest | |
needs: build | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@v3 | |
- name: Determine AWS Context | |
id: aws-context | |
run: .github/workflows/aws-context.sh | |
env: | |
STAKING_PROD_IAM_ARN: ${{ secrets.STAKING_PROD_IAM_ARN }} | |
STAKING_RO_IAM_ARN: ${{ secrets.STAKING_RO_IAM_ARN }} | |
- name: Authenticate to AWS | |
uses: aws-actions/configure-aws-credentials@v1-node16 | |
with: | |
aws-region: us-east-1 | |
role-to-assume: ${{ steps.aws-context.outputs.role-arn }} | |
role-duration-seconds: 900 | |
- name: Download Matrix Artifacts | |
uses: actions/download-artifact@v3 | |
- name: Publish Website | |
run: .github/workflows/publish.sh | |
env: | |
CF_DISTRIBUTION: ${{ secrets.STAKING_PROD_CF_DISTRIBUTION }} | |
DRY_RUN: ${{ steps.aws-context.outputs.dry-run }} | |
S3_BUCKET: ${{ secrets.STAKING_PROD_S3_BUCKET }} |