feat: configure Cloudfront to support SPA using history API #2817
Workflow file for this run
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 GOST Website | |
on: | |
pull_request: | |
paths: | |
- ".github/workflows/build-website.yml" | |
- "packages/client/**" | |
- ".node-version" | |
- ".nvmrc" | |
- "yarn.lock" | |
workflow_call: | |
outputs: | |
artifact: | |
description: "Identifier for the website build artifact" | |
value: ${{ jobs.build.outputs.artifact }} | |
concurrency: | |
group: build-website-${{ github.workflow_ref }} | |
cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
permissions: | |
contents: read | |
jobs: | |
build: | |
name: Build website deployment artifact | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
outputs: | |
artifact: website-${{ github.sha }} | |
env: | |
BUILD_DIR: packages/client | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version-file: '.nvmrc' | |
cache: yarn | |
- name: Install dependencies | |
working-directory: ${{ env.BUILD_DIR }} | |
run: yarn install --frozen-lockfile | |
- name: Build the website | |
working-directory: ${{ env.BUILD_DIR }} | |
run: yarn build | |
- name: Upload build artifact | |
# if: ${{ github.event_name != 'pull_request' }} | |
uses: actions/upload-artifact@v3 | |
with: | |
name: website-${{ github.sha }} | |
path: ${{ env.BUILD_DIR }}/dist |