hohel
hohel

Reputation: 1

Implementing CI/CD Pipeline between Github Actions and my AWS S3 Bucket

I'm stuck in my CI/CD pipeline between Github Actions and AWS S3. I wrote a YAML script to deploy my website to S3, but when I push my website to the remote Github repository, it doesn't deploy to my S3 bucket. I'm getting an error message from Github Actions that says "The workflow is not valid." I've watched multiple tutorial videos, including this one at timestamp 10:12 https://www.youtube.com/watch?v=cwX3XAx3CGg&t=612s, but I'm still stuck. Can anyone help me troubleshoot this issue?

I'm block in this step in the CI/CD pipeline between github actions ans S3. When I push my website to the remote Github repository it doesn't deploy the website to my S3 bucket.

This is the yaml script that I wrote to deploy to S3

on:
  push:
    branches:
    - main

jobs:
  deploy:
    runs on: ubuntu-latest
    steps:
    - uses: actions/checkout@master
    - uses: hohel/git-s3-push@master
      with:
        args: --acl public-read --follow-symlinks --delete
      env:
        AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }}
        AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
        AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
        AWS_REGION: 'us-east-1' #optional: defaults to us-east-1
        SOURCE_DIR: 'website' # optional: defaults to entire repository

and here is the error I get. The workflow is not valid. .github/workflows/deployToS3.yml (Line: 1, Col: 1): Unexpected value 'Name' .github/workflows/deployToS3.yml (Line: 10, Col: 5): Unexpected value 'runs on' error message from Github Actions

and this video as well but I skipped all the workflow and went straight to the deployment script. https://www.youtube.com/watch?v=mFFXuXjVgkU&t=2s

Screenshot of Github Actions error message

Upvotes: 0

Views: 290

Answers (0)

Related Questions