Skip to content

update redirect

update redirect #199

name: Deploy to main
on:
push:
branches:
- main
- master
#here we choose to deploy only when a push is on main branch
jobs:
Deploy:
runs-on: ubuntu-latest
environment:
name: prd
url: https://www.arkyasmal.com
steps:
- uses: actions/checkout@v1
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: 18
# - name: Install AWS CDK
# shell: bash
# run: npm install -g aws-cdk
- name: Install dependencies
shell: bash
run: npm install
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_DEPLOY_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_DEPLOY_SECRET_KEY }}
aws-region: us-east-1
- name: Create .env file
uses: ozaytsev86/create-env-file@v1
with:
ENV_AMAZON_REST_API_KEY: ${{ secrets.AMAZON_REST_API_KEY }}
ENV_GIT_HUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GIT_HUB_PERSONAL_ACCESS_TOKEN }}
ENV_GOOGLE_DRIVE_FOLDER_NAME: ${{ secrets.GOOGLE_DRIVE_FOLDER_NAME }}
ENV_GOOGLE_DRIVE_PARENT_FOLDER_NAME: ${{ secrets.GOOGLE_DRIVE_PARENT_FOLDER_NAME }}
ENV_GOOGLE_SERVICE_ACCOUNT_EMAIL: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL }}
ENV_GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY }}
ENV_STACKOVERFLOW_API_ID: ${{ secrets.STACKOVERFLOW_API_ID }}
ENV_STACKOVERFLOW_API_KEY: ${{ secrets.STACKOVERFLOW_API_KEY }}
ENV_STACKOVERFLOW_API_SECRET: ${{ secrets.STACKOVERFLOW_API_SECRET }}
ENV_WEBHOOKS_API_KEY: ${{ secrets.WEBHOOKS_API_KEY }}
ENV_WEBHOOKS_API_TOKEN: ${{ secrets.WEBHOOKS_API_TOKEN }}
ENV_WEBHOOKS_API_TOKEN_SECRET: ${{ secrets.WEBHOOKS_API_TOKEN_SECRET }}
ENV_AZURE_COMPUTER_VISION_API_ENDPOINT: ${{secrets.AZURE_COMPUTER_VISION_API_ENDPOINT}}
ENV_AZURE_COMPUTER_VISION_API_KEY: ${{secrets.AZURE_COMPUTER_VISION_API_KEY}}
ENV_LINKED_IN_PASSWORD: ${{secrets.LINKED_IN_PASSWORD}}
ENV_SES_EMAIL_ADDRESS: ${{secrets.SES_EMAIL_ADDRESS}}
ENV_SNS_PHONE_NUMBER: ${{secrets.SNS_PHONE_NUMBER}}
ENV_SEND_IN_BLUE_API_KEY: ${{secrets.SEND_IN_BLUE_API_KEY}}
- name: Generate Cloud Template and Bootstrap
shell: bash
run: npm run bootstrap
- name: Deploy To AWS
shell: bash
run: npm run deploy