Merge pull request #57 from bu-ist/error-code-responses #39
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
# ---------------------------------------------------------------------------------------------------------- | |
# | |
# This is the production continuous integration build github action. | |
# Activates on any commit to the main branch. | |
# | |
# ---------------------------------------------------------------------------------------------------------- | |
name: | |
Wordpress protected assets deploy to prod | |
on: | |
push: | |
branches: | |
- main | |
env: | |
AWS_REGION: us-east-1 | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
contents: read # This is required for actions/checkout | |
jobs: | |
# Setup the container, build and deploy the app | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: aws-actions/setup-sam@v2 | |
- uses: actions/setup-node@v2 | |
with: | |
node-version: '18' | |
- uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: arn:aws:iam::115619461932:role/WordpressProtectedAssetsGithubActionsCloudformingRole | |
role-session-name: GitHub_to_AWS_via_FederatedOIDC | |
aws-region: ${{ env.AWS_REGION }} | |
- run: npm ci | |
- run: npm test | |
- run: sam build --config-env prod --use-container | |
- run: sam deploy --config-env prod |