Skip to content

Update main.yml

Update main.yml #3

Workflow file for this run

name: My first CI/CD Script
on:
push:
branches:
- master
jobs:
deploy:
runs-on : ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with :
aws-access-key-id : ${{secrets.AWS_ACCESS_KEY_ID}}
aws-secret-key: ${{secrets.AWS_SECRET_KEY}}
region: ${{secret.REGION}}

Check failure on line 19 in .github/workflows/main.yml

View workflow run for this annotation

GitHub Actions / My first CI/CD Script

Invalid workflow file

The workflow is not valid. .github/workflows/main.yml (Line: 19, Col: 15): Unrecognized named-value: 'secret'. Located at position 1 within expression: secret.REGION
- name: Change directory to frontend
run : cd frontend
- name: Install dependancy
run: npm ci
- name : Build
run : npm build
- name: push to production
run : aws s3 sync ./dist s3://${{secrets.AWS_S3_BUCKET}}
- name: CloudFront invalidation
run : aws cloudfront create-invalidation --distribution-id=${{secrets.DISTRIBUTION_ID}} --path="/*"