Skip to content

Commit

Permalink
add AWS publish github action
Browse files Browse the repository at this point in the history
  • Loading branch information
thescientist13 committed Sep 20, 2024
1 parent ea9ee89 commit e4fcdda
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Upload Website to S3

on:
push:
branches:
- main

jobs:
build:
runs-on: ubuntu-20.04

# match to your version of NodeJS
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v3
with:
node-version: 18.20.2

# - name: Navigate to repo
# run: |
# cd $GITHUB_WORKSPACE

- name: Install Dependencies
run: |
npm ci
# use your greenwood build script
- name: Run Build
run: |
npm run build
- name: Deploy to S3
uses: opspresso/action-s3-sync@master
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_SECRET_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "us-east-2"
FROM_PATH: "./public"
# your target s3 bucket name goes here
DEST_PATH: ${{ secrets.AWS_BUCKET_NAME }}

0 comments on commit e4fcdda

Please sign in to comment.