Switching to use AWS::SSM::Parameter instead of env variable #8
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: CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- run: node --version | |
- run: npm ci | |
- run: npm test | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
environment: aws/prod | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_DEFAULT_REGION: ${{ vars.AWS_DEFAULT_REGION }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Provision infrastructure | |
run: | | |
aws cloudformation deploy \ | |
--template-file infra/aws.yaml \ | |
--stack-name Discord-Bot-Service \ | |
--parameter-overrides DiscordToken=${{ secrets.DISCORD_BOT_TOKEN }} | |
# --capabilities CAPABILITY_IAM |