Skip to content

fix: page refresh when navigating home #23

fix: page refresh when navigating home

fix: page refresh when navigating home #23

Workflow file for this run

name: Build and Publish to AWS S3
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: read
id-token: write
jobs:
build-and-publish:
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
aws-region: us-east-2
role-to-assume: arn:aws:iam::124355672874:role/GitHub_EconoSim_econosim.org
- name: Set up Node.js with caching
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
cache-dependency-path: package-lock.json
- name: Install npm dependencies
run: |
npm install
- name: Build the React app
run: |
npm run build
- name: Sync build output to AWS S3
run: |
aws s3 sync \
build \
s3://econosim-website/react \
--cache-control "max-age=60, s-maxage=60" \
--delete \
--no-progress