ci: use AWS access keys for authentication #3
This file contains hidden or 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 Dev | |
| on: | |
| push: | |
| branches: [ dev ] | |
| workflow_dispatch: {} | |
| jobs: | |
| deploy-coaching: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install AWS SAM CLI | |
| uses: aws-actions/setup-sam@v2 | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-region: us-east-1 | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| - name: Build Coaching Service | |
| working-directory: coaching | |
| run: sam build --template template.yaml --parallel --cached | |
| - name: Deploy Coaching Service | |
| working-directory: coaching | |
| run: | | |
| sam deploy \ | |
| --template-file .aws-sam/build/template.yaml \ | |
| --stack-name purposepath-coaching-api-dev \ | |
| --capabilities CAPABILITY_IAM CAPABILITY_NAMED_IAM \ | |
| --parameter-overrides Stage=dev EnableCustomDomain=true CustomDomainName=api.dev.purposepath.app \ | |
| --region us-east-1 --resolve-s3 --resolve-image-repos --no-confirm-changeset | |