-
Notifications
You must be signed in to change notification settings - Fork 14
46 lines (41 loc) · 1.73 KB
/
deploy-prod.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# name: Deploy to prod
# on:
# push:
# branches:
# - main
# jobs:
# deploy-prod:
# runs-on: ubuntu-latest
# permissions:
# id-token: write
# contents: read
# steps:
# - name: Checkout
# uses: actions/[email protected]
# - name: Configure AWS credentials
# uses: aws-actions/configure-aws-credentials@v1
# with:
# role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_ID }}:role/github-actions-frontend-access
# aws-region: ap-south-1
# - name: Build frontend and push on ECR
# run: |
# cd website
# echo NEXT_PUBLIC_IFRAMELY_KEY=${{ secrets.IFRAMELY_KEY_PROD }} >> .env
# echo NEXT_PUBLIC_RECAPTCHA_SITE_KEY=${{ secrets.RECAPTCHA_SITE_KEY_PROD }} >> .env
# echo NEXT_PUBLIC_MIXPANEL_PROJECT_TOKEN=${{ secrets.MIXPANEL_PROJECT_TOKEN_PROD }} >> .env
# echo NEXT_PUBLIC_STRAPI_URL=${{ secrets.STRAPI_URL }} >> .env
# echo NEXT_PUBLIC_STRAPI_DOMAIN=${{ secrets.STRAPI_DOMAIN }} >> .env
# echo NEXT_PUBLIC_WEBSITE_URL=${{ secrets.WEBSITE_URL_PROD }} >> .env
# echo NEXT_PUBLIC_API_BASE=${{ secrets.API_BASE_PROD }} >> .env
# mv config-prod.js config.js
# bash ./../deploy/deploy-ecr-image.sh prod-blog ${{ secrets.AWS_ACCOUNT_ID }}.dkr.ecr.$AWS_REGION.amazonaws.com/canopas-blog
# - name: Trigger Canopas website Workflow
# uses: actions/github-script@v6
# with:
# github-token: ${{ secrets.WORKFLOW_TOKEN }}
# script: |
# await github.rest.repos.createDispatchEvent({
# owner: 'canopas',
# repo: 'canopas-website',
# event_type: 'deploy-blog-prod',
# });