eisberg-labs / static-website-to-s3

Github action that deploys static website to s3.

Home Page:https://static-website-to-s3.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Deploy NextJS

Static website to S3 Github action

This action will deploy your static website to S3 without the html extension.

I tested only with NextJS exported website, but I don't see any reason why it shouldn't work with other setups. If it's not working for you, please report an issue.

Prerequisite

You have configured your S3 bucket for static website hosting.

Usage

Define AWS_DEFAULT_REGION, AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables. This action should be run after the static website is built:

 - name: Deploy to s3
   uses: eisberg-labs/static-website-to-s3@main
   with:
     target: nextjs-testapp/out
     dest: next-to-s3/nextjs-testapp
     exclusions: ^nextjs-testapp\/out\/(index|404).html$
     bucket: ${{ secrets.BUCKET }}

Example

There's an example action at Actions, and configuration file testing the NextJS build.

License

MIT © Eisberg Labs

About

Github action that deploys static website to s3.

https://static-website-to-s3.vercel.app

License:MIT License


Languages

Language:CSS 56.8%Language:TypeScript 29.8%Language:Shell 12.5%Language:JavaScript 1.0%