Skip to content

Commit

Permalink
Merge pull request #149 from multiversx/amg-deployment
Browse files Browse the repository at this point in the history
Update deployment envs
  • Loading branch information
mgavrila authored Oct 30, 2023
2 parents a8ec9e9 + 7436c78 commit ef83576
Show file tree
Hide file tree
Showing 3 changed files with 93 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: deploy
name: deploy-devnet

on:
push:
branches: [main]
repository_dispatch:
types: deploy
types: deploy-devnet
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -32,13 +32,13 @@ jobs:
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: 'us-east-1'
- name: Deploy to S3 bucket
run: aws s3 sync ./build/ s3://${{ secrets.AWS_S3_BUCKET }} --delete
run: aws s3 sync ./build/ s3://${{ secrets.AWS_S3_BUCKET_DEVNET }} --delete
- name: Slack Notification
uses: rtCamp/action-slack-notify@master
env:
SLACK_ICON_EMOJI: ':nerd_face:'
SLACK_USERNAME: ${{ secrets.AWS_S3_BUCKET }}
SLACK_MESSAGE: ${{ secrets.AWS_S3_BUCKET }}
SLACK_USERNAME: ${{ secrets.AWS_S3_BUCKET_DEVNET }}
SLACK_MESSAGE: ${{ secrets.AWS_S3_BUCKET_DEVNET }}
SLACK_FOOTER: ''
MSG_MINIMAL: true
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
44 changes: 44 additions & 0 deletions .github/workflows/deploy-mainnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: deploy-mainnet

on:
push:
branches: [main]
repository_dispatch:
types: deploy-mainnet
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
ref: main
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Setup yarn
run: npm install -g yarn
- run: yarn install
- run: yarn build:mainnet
env:
CI: false
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: 'us-east-1'
- name: Deploy to S3 bucket
run: aws s3 sync ./build/ s3://${{ secrets.AWS_S3_BUCKET_MAINNET }} --delete
- name: Slack Notification
uses: rtCamp/action-slack-notify@master
env:
SLACK_ICON_EMOJI: ':nerd_face:'
SLACK_USERNAME: ${{ secrets.AWS_S3_BUCKET_MAINNET }}
SLACK_MESSAGE: ${{ secrets.AWS_S3_BUCKET_MAINNET }}
SLACK_FOOTER: ''
MSG_MINIMAL: true
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
44 changes: 44 additions & 0 deletions .github/workflows/deploy-testnet.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
name: deploy-testnet

on:
push:
branches: [main]
repository_dispatch:
types: deploy-testnet
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
with:
ref: main
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Setup yarn
run: npm install -g yarn
- run: yarn install
- run: yarn build:testnet
env:
CI: false
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: 'us-east-1'
- name: Deploy to S3 bucket
run: aws s3 sync ./build/ s3://${{ secrets.AWS_S3_BUCKET_TESTNET }} --delete
- name: Slack Notification
uses: rtCamp/action-slack-notify@master
env:
SLACK_ICON_EMOJI: ':nerd_face:'
SLACK_USERNAME: ${{ secrets.AWS_S3_BUCKET_TESTNET }}
SLACK_MESSAGE: ${{ secrets.AWS_S3_BUCKET_TESTNET }}
SLACK_FOOTER: ''
MSG_MINIMAL: true
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}

0 comments on commit ef83576

Please sign in to comment.