Skip to content

Update main.yml

Update main.yml #63

Workflow file for this run

name: Deploy to S3
on:
push:
branches:
- 'staticSite' # Trigger the workflow on push to the branch
permissions:
id-token: write
contents: read
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository code
- uses: actions/checkout@v3
# Step 2: Configure AWS credentials
- name: Configure AWS credentials from AWS account
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.AWS_INTERIM_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}
role-session-name: GitHub-OIDC-frontend
# Step 3: Sync files to S3 for static website hosting
- name: Sync files to S3
run: |
aws s3 sync ./ s3://srophe-syriaca-front-end --delete
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}