Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/git-pages-deploy-frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy Frontend

on:
workflow_call:
inputs:
workspace:
description: "The npm workspace to build"
required: true
type: string
build_path:
description: "Path to the built frontend"
required: true
type: string

permissions:
contents: read
pages: write
id-token: write

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm

- name: Install dependencies
run: npm ci --include=optional

- name: Build frontend
run: npm run build --workspace=${{ inputs.workspace }}

- name: Add SPA fallback
run: cp ${{ inputs.build_path }}/index.html ${{ inputs.build_path }}/404.html

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ${{ inputs.build_path }}

- name: Deploy
uses: actions/deploy-pages@v4
13 changes: 13 additions & 0 deletions .github/workflows/git-pages-deploy-scouting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Deploy Scouting Frontend

on:
push:
branches: [connect-front-back]
workflow_dispatch:

jobs:
deploy:
uses: ./.github/workflows/deploy-frontend.yml
with:
workspace: scouting-frontend
build_path: apps/scouting/frontend/dist
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
node_modules
package-lock.json
.turbo
dist
.secret.env
Expand Down
1 change: 1 addition & 0 deletions apps/scouting/frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const DEFAULT_PORT = 80;
const port = parseInt(process.env.FRONTEND_PORT ?? DEFAULT_PORT.toString());

export default defineConfig({
base: "/Full-Stack-Projects/",
appType: "spa",
server: {
port: port,
Expand Down
Loading
Loading