Revert "Add highscore to root page using htmx (#24)" (#27) #4
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: Deploy API to AWS | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
env: | |
AWS_REGION: eu-west-1 | |
STACK_NAME: musicflow-sam-app | |
S3_BUCKET: portfolio-on-lambda-2999-v3 | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: aws-actions/setup-sam@v2 | |
with: | |
use-installer: true | |
- 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: ${{env.AWS_REGION}} | |
- name: Create env file | |
run: | | |
touch .env | |
echo CLIENT_ID=${{ secrets.CLIENT_ID }} >> .env | |
echo CLIENT_SECRET=${{ secrets.CLIENT_SECRET }} >> .env | |
cat .env | |
# Build inside Docker containers | |
- run: sam build --use-container -t template.yaml | |
# Prevent prompts and failure when the stack is unchanged | |
- run: | | |
sam deploy \ | |
--stack-name ${{env.STACK_NAME}} \ | |
--s3-bucket ${{env.S3_BUCKET}} \ | |
--capabilities CAPABILITY_NAMED_IAM \ | |
--resolve-image-repos \ | |
--no-confirm-changeset \ | |
--no-fail-on-empty-changeset\ |