Skip to content

Commit

Permalink
add github actions workflow to deploy web srvc;
Browse files Browse the repository at this point in the history
  • Loading branch information
noynovera committed Nov 28, 2024
1 parent 041daeb commit 5af0033
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/deploy-amplify-web-srvc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Deploy Amplify web srvc

on:
# Runs on pushes targeting the default branch
# push:
# branches: ["main"]

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

env:
AWS_REGION: ${{ secrets.AWS_REGION }} # set this to your preferred AWS region, e.g. us-west-1
IAM_ROLE: ${{ secrets.IAM_ROLE }} # set this to your IAM Role

permissions:
contents: read
id-token: write # Allow GitHub's OIDC provider to create a JSON Web Token for every run

jobs:
deploy-amplify-web-srvc:
name: Deploy Amplify web srvc
runs-on: ubuntu-latest
environment: production

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.IAM_ROLE }}
role-session-name: nynvrio-aws-github-actions-session
aws-region: ${{ env.AWS_REGION }}

- name: Trigger application build through webhook
run: |
URL="${{ secrets.AMPLIFY_WEB_SRVC_WEBHOOK_URL }}"
curl -X POST -d {} "$URL" -H "Content-Type: application/json"

0 comments on commit 5af0033

Please sign in to comment.