Skip to content

v0.9.0

v0.9.0 #4

Workflow file for this run

name: Deploy Prod
on:
release:
types:
- published
workflow_dispatch:
jobs:
deploy:
name: Deploy Prod
runs-on: ubuntu-22.04
environment: Production
env:
READ_PRIVATE_SUBMODULE_TOKEN: ${{ secrets.READ_PRIVATE_SUBMODULE_TOKEN }}
WORKING_DIRECTORY: ${{ vars.DEPLOY_WORKING_DIRECTORY }}
DEPLOY_FILENAME: ${{ vars.DEPLOY_FILENAME }}
S3_REGION: ${{ vars.S3_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: main
submodules: true
token: ${{ env.READ_PRIVATE_SUBMODULE_TOKEN }}
- name: Install AWS cli
run: |
sudo apt-get update
sudo apt-get install awscli
- name: Deploy code to AWS S3
run: |
zip -r ${{ env.DEPLOY_FILENAME }} appspec.yml app env deploy-script
aws s3 cp ${{ env.DEPLOY_FILENAME }} s3://stat-ec2-app-code-deploy-bucket/${{ env.DEPLOY_FILENAME }} --region ${{ env.S3_REGION }}
working-directory: ${{ env.DEPLOY_WORKING_DIRECTORY }}