Skip to content

Reuse env var

Reuse env var #19

Workflow file for this run

name: Deploy to AWS S3
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
env:
VITE_AWS_REGION: ${{ secrets.AWS_REGION }}
VITE_QUEUE_URL: ${{ secrets.QUEUE_URL }}
VITE_FUNCTION_NAME: ${{ secrets.FUNCTION_NAME }}
VITE_IDENTITY_POOL: ${{ secrets.IDENTITY_POOL_ID }}
VITE_BATCH_BUCKET: ${{ secrets.S3_BATCH_BUCKET }}
steps:
- uses: actions/checkout@v1
- name: Install and Build
uses: actions/setup-node@v3
with:
node-version: 18
- 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: ap-northeast-1
- name: Deploy static site to S3 bucket
run: |
npm install
npm run build
pushd dist
aws s3 sync . s3://audioctxai.com --delete --sse AES256 --cache-control no-cache
popd
rm -rf node_modules package-log.json dist