add env to deploy.yml #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Auto Deploy | |
env: | |
NEXT_PUBLIC_API_URL: "http://ec2-44-207-5-154.compute-1.amazonaws.com" | |
on: | |
push: | |
branches: | |
- main | |
- "f/**" | |
jobs: | |
build_and_deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "21" | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Deploy to S3 | |
run: | | |
aws configure set aws_access_key_id ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws configure set aws_secret_access_key ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws configure set default.region us-east-1 | |
aws s3 sync ./out/ s3://youtube-english |