Open D-sense opened 3 years ago
I am getting the same error after attempting to build and deploy a react app:
jobs:
deploy-production:
name: Deploy Production
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/production'
steps:
# Checkout the repo
- name: Checkout code
uses: actions/checkout@v2
# Use Node.js 12.x
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '12.x'
# Install & Build
- name: Yarn Install
run: yarn install
- name: Yarn Build
run: NODE_ENV=production CI="" yarn build
# Deploy & Activate!
- name: Deploy to S3
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --delete
env:
AWS_S3_BUCKET: ${{ secrets.AWS_PRODUCTION_BUCKET }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "us-east-1"
SOURCE_DIR: "build"
- name: Invalidate Cloudfront
uses: awact/cloudfront-action@master
env:
SOURCE_PATH: './*'
AWS_REGION: 'us-east-1'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
DISTRIBUTION_ID: ${{ secrets.AWS_CLOUDFRONT_PRODUCTION_ID }}
Similar error with the following:
- name: Upload non-html
uses: jakejarvis/s3-sync-action@master
with:
args: --acl public-read --follow-symlinks --delete --include "*" --exclude "*.html"
env:
AWS_S3_BUCKET: 'canon-press'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
SOURCE_DIR: 'site/public'
Rather than the "/" in "Unknown options: /", it shows a comma separated list of all the folders in the root folder.
@SethThoburn always use ' '
in the args. Never use " "
. Not sure if it's this, but I had some issues using double quotes.
@SethThoburn always use
' '
in the args. Never use" "
. Not sure if it's this, but I had some issues using double quotes.
This fixed fixed the error for me 🤦🏼
Fixed the problem for me. Someone should get a PR up for this cough cough
Hi.
I am getting this error message in my build, specifically at the point of using
jakejarvis/s3-sync-action@master
:This is the script I am using for the "build" job:
This is the script I am using for the "deploy" job:
Thanks in advance!