jakarta isn't ready for primetime #28
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
name: Build and publish static site | |
on: | |
push: {} | |
pull_request: | |
branches: [main] | |
jobs: | |
publish: | |
name: Build and publish | |
runs-on: ubuntu-latest | |
# Permissions are needed for GitHub's OIDC Token endpoint. | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: "22.x" | |
cache: npm | |
- run: npm ci | |
- run: npm run build | |
- name: Assume AWS Role | |
uses: aws-actions/configure-aws-credentials@v4 | |
if: github.ref == 'refs/heads/main' | |
with: | |
role-to-assume: arn:aws:iam::080825576347:role/GitHubActionsHotsockWebsiteDeployRole | |
aws-region: us-west-2 | |
- name: Publish site to S3 | |
if: github.ref == 'refs/heads/main' | |
run: | | |
aws s3 sync \ | |
build/ \ | |
s3://hotsockwebsite-bucket-1b98507gb6g3t \ | |
--delete |