Coder Social home page Coder Social logo

onramper / action-deploy-aws-static-site Goto Github PK

View Code? Open in Web Editor NEW
77.0 5.0 22.0 118.02 MB

Batteries-included Github action that deploys a static site to AWS Cloudfront, taking care of DNS, SSL certs and S3 buckets

Home Page: https://github.com/marketplace/actions/deploy-static-site-to-aws

License: MIT License

JavaScript 2.85% TypeScript 97.15%
aws actions github-action cloudfront

action-deploy-aws-static-site's Introduction

Deploy static site to AWS

Batteries-included Github action that deploys a static site to AWS Cloudfront, taking care of DNS, SSL certs and S3 buckets

Usage

- name: Deploy to AWS
  uses: onramper/[email protected]
  with:
    AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
    AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
    domain: subdomain.example.com
    publish_dir: ./public

Make sure to add your domain to Route 53 as hosted zone and add an NS record if needed. An A record will be automatically added by the action.

action-deploy-aws-static-site's People

Contributors

corollari avatar dependabot[bot] avatar noorts avatar salahzsh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

action-deploy-aws-static-site's Issues

Access Denied S3 Error using administrator credentials

I should have full access to this account. Puzzling.

Failed resources:
StaticPage-nonsense-com | 8:09:00 PM | CREATE_FAILED        | AWS::S3::BucketPolicy               | StaticPage/WebsiteBucket/Policy (WebsiteBucketPolicyE10E3262) API: s3:PutBucketPolicy Access Denied
	new BucketPolicy (/home/runner/work/_actions/onramper/action-deploy-aws-static-site/v2/node_modules/@aws-cdk/aws-s3/lib/bucket-policy.js:34:25)
	\_ Bucket.addToResourcePolicy (/home/runner/work/_actions/onramper/action-deploy-aws-static-site/v2/node_modules/@aws-cdk/aws-s3/lib/bucket.js:153:27)
	\_ Function.addToPrincipalOrResource (/home/runner/work/_actions/onramper/action-deploy-aws-static-site/v2/node_modules/@aws-cdk/aws-iam/lib/grant.js:72:49)
	\_ Bucket.grantPublicAccess (/home/runner/work/_actions/onramper/action-deploy-aws-static-site/v2/node_modules/@aws-cdk/aws-s3/lib/bucket.js:368:26)
	\_ new Bucket (/home/runner/work/_actions/onramper/action-deploy-aws-static-site/v2/node_modules/@aws-cdk/aws-s3/lib/bucket.js:644:18)
	\_ new StaticPageStack (/home/runner/work/_actions/onramper/action-deploy-aws-static-site/v2/lib/static-page-stack.js:42:31)
	\_ Object.<anonymous> (/home/runner/work/_actions/onramper/action-deploy-aws-static-site/v2/lib/stack.js:32:1)
	\_ Module._compile (node:internal/modules/cjs/loader:1105:14)
	\_ Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
	\_ Module.load (node:internal/modules/cjs/loader:981:32)
	\_ Function.Module._load (node:internal/modules/cjs/loader:822:12)
	\_ Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
	\_ node:internal/main/run_main_module:17:47

Access Denied error for S3

I'm surprised to get this error because my credentials have administrator access:

Failed resources:
StaticPage-nonsense-com | 8:09:00 PM | CREATE_FAILED        | AWS::S3::BucketPolicy               | StaticPage/WebsiteBucket/Policy (WebsiteBucketPolicyE10E3262) API: s3:PutBucketPolicy Access Denied
	new BucketPolicy (/home/runner/work/_actions/onramper/action-deploy-aws-static-site/v2/node_modules/@aws-cdk/aws-s3/lib/bucket-policy.js:34:25)
	\_ Bucket.addToResourcePolicy (/home/runner/work/_actions/onramper/action-deploy-aws-static-site/v2/node_modules/@aws-cdk/aws-s3/lib/bucket.js:153:27)
	\_ Function.addToPrincipalOrResource (/home/runner/work/_actions/onramper/action-deploy-aws-static-site/v2/node_modules/@aws-cdk/aws-iam/lib/grant.js:72:49)
	\_ Bucket.grantPublicAccess (/home/runner/work/_actions/onramper/action-deploy-aws-static-site/v2/node_modules/@aws-cdk/aws-s3/lib/bucket.js:368:26)
	\_ new Bucket (/home/runner/work/_actions/onramper/action-deploy-aws-static-site/v2/node_modules/@aws-cdk/aws-s3/lib/bucket.js:644:18)
	\_ new StaticPageStack (/home/runner/work/_actions/onramper/action-deploy-aws-static-site/v2/lib/static-page-stack.js:42:31)
	\_ Object.<anonymous> (/home/runner/work/_actions/onramper/action-deploy-aws-static-site/v2/lib/stack.js:32:1)
	\_ Module._compile (node:internal/modules/cjs/loader:1105:14)
	\_ Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
	\_ Module.load (node:internal/modules/cjs/loader:981:32)
	\_ Function.Module._load (node:internal/modules/cjs/loader:822:12)
	\_ Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:77:12)
	\_ node:internal/main/run_main_module:17:47

Deployment Fail (Dependency Issue?)

Hey there, trying to use this action and having the deploy step fail on the following:

Error: Command failed: (cd /home/runner/work/_actions/onramper/action-deploy-aws-static-site/v1 && PATH="/home/runner/runners/2.287.1/externals/node12/bin:$PATH" node node_modules/aws-cdk/bin/cdk.js deploy --require-approval never)

I don't know much about node but this feels like a dependency issue? Maybe cdk.js isn't found or something? Any advice appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.