Skip to content

Commit

Permalink
Merge pull request #120 from Cerebellum-Network/dev
Browse files Browse the repository at this point in the history
Fix stage/prod workflows
  • Loading branch information
ayushmishra2005 authored Nov 26, 2024
2 parents b953162 + f20c07a commit 68bd544
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 19 deletions.
17 changes: 7 additions & 10 deletions .github/workflows/prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,17 @@ on:
branches:
- master

permissions:
id-token: write
contents: read

jobs:
build-and-deploy:
uses: Cerebellum-Network/reusable-workflows/.github/workflows/build-and-upload-static.yaml@1.0.0
uses: Cerebellum-Network/reusable-workflows/.github/workflows/deploy-to-cloudfront.yaml@master
with:
runs-on: '["self-hosted", "cere-network-large"]'
build_container: 'node:20-buster'
deploy_container: 'ubuntu:20.04'
install_packages_command: 'yarn install'
build_command: 'yarn build'
path_to_static_files_to_upload: 'packages/apps/build'
secrets:
NETWORK_AWS_ACCESS_KEY_ID: ${{ secrets.PRD_NETWORK_AWS_ACCESS_KEY_ID }}
NETWORK_AWS_SECRET_ACCESS_KEY: ${{ secrets.PRD_NETWORK_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME_PRD }}
CF_DISTRIBUTION_ID: ${{ secrets.CF_DISTRIBUTION_ID_PRD }}

s3_bucket_name: 'prd-cere-explorer-dist'
aws_account_id: ${{ vars.PRD_NETWORK_AWS_ACCOUNT_ID }}
16 changes: 7 additions & 9 deletions .github/workflows/stage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,17 @@ on:
- 'release/**'
- 'hotfix/**'

permissions:
id-token: write
contents: read

jobs:
build-and-deploy:
uses: Cerebellum-Network/reusable-workflows/.github/workflows/build-and-upload-static.yaml@1.0.0
uses: Cerebellum-Network/reusable-workflows/.github/workflows/deploy-to-cloudfront.yaml@master
with:
runs-on: '["self-hosted", "cere-network-large"]'
build_container: 'node:20-buster'
deploy_container: 'ubuntu:20.04'
install_packages_command: 'yarn install'
build_command: 'yarn build'
path_to_static_files_to_upload: 'packages/apps/build'
secrets:
NETWORK_AWS_ACCESS_KEY_ID: ${{ secrets.STG_NETWORK_AWS_ACCESS_KEY_ID }}
NETWORK_AWS_SECRET_ACCESS_KEY: ${{ secrets.STG_NETWORK_AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
S3_BUCKET_NAME: ${{ secrets.S3_BUCKET_NAME_STG }}
CF_DISTRIBUTION_ID: ${{ secrets.CF_DISTRIBUTION_ID_STG }}
s3_bucket_name: 'stg-cere-explorer-dist'
aws_account_id: ${{ vars.STG_NETWORK_AWS_ACCOUNT_ID }}

0 comments on commit 68bd544

Please sign in to comment.