-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ea9ee89
commit e4fcdda
Showing
1 changed file
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 }} |