-
Notifications
You must be signed in to change notification settings - Fork 4
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
Showing
1 changed file
with
41 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,41 @@ | ||
name: Publish Site | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
# env: | ||
# # Use docker.io for Docker Hub if empty | ||
# REGISTRY: ghcr.io | ||
# # github.repository as <account>/<repo> | ||
# IMAGE_NAME: ${{ github.repository }} | ||
|
||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
working-directory: web/ | ||
|
||
- name: Build static site | ||
run: node bundle.js | ||
working-directory: web/ | ||
|
||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
role-to-assume: "${{ vars.TARGET_ROLE_ARN }}" | ||
aws-region: ap-southeast-2 | ||
|
||
- name: Upload site to S3 | ||
run: aws s3 sync ./static/ s3://hotprices.org/ |