aws-cli
aws-cli copied to clipboard
how to copy folder in my repo
I'm trying to figure out how to give the github action the contents of the folder I want to send to s3. When I specify the folder it returns an error saying the folder cannot be found.
Kinda new to actions, maybe I need to add something first?
script looks like:
name: Deployment scripts
on:
push:
branches:
- master
paths:
- 'cloud/**'
jobs:
sendToS3:
runs-on: ubuntu-latest
env:
CI: true
timeout-minutes: 10
steps:
- name: AWS CLI
uses: ItsKarma/[email protected] # https://github.com/marketplace/actions/aws-cli
with:
args: s3 sync --delete cloud/ s3://${{secrets.BUCKET}}/
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "us-west-2"
Thanks
It's unfortunate I've found your comment so long after you've posted but I think I may have your solution (If you haven't resolved it yet). I believe you're missing the following in your steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
This snippet comes from an example/template yml file (forgive me but I couldn't find exactly which site I found it)
So your steps: should look more like the following
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
- name: AWS CLI
uses: ItsKarma/[email protected] # https://github.com/marketplace/actions/aws-cli
with:
args: s3 sync --delete cloud/ s3://${{secrets.BUCKET}}/
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "us-west-2"