Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
Try building frontend and deploying
Browse files Browse the repository at this point in the history
  • Loading branch information
AnnsAnns committed May 6, 2024
1 parent 42b8b30 commit c19ad66
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
43 changes: 43 additions & 0 deletions .github/workflows/build_frontend.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Frontend Upload
on:
push:
paths:
- '.github/workflows/build_frontend.yml'
- 'frontend/**'
# We only run this GitHub action upon new commits to `main`
branches:
- main
- frontend
jobs:
build-and-deploy:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./frontend
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Bun
uses: oven-sh/setup-bun@v1

- name: Install
run: bun install

- name: Build
run: bun run build

- name: Reparent into dist/frontend
run: cp -r dist frontend/dist

- name: Deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: frontend/dist
# Remove previous build files
clean: true
# Do not remove the `.nojekyll` file: we have manually added an empty `.nojekyll` file at the root of the `gh-pages` branch and we don't want having to re-create it after each build.
clean-exclude: |
.nojekyll
CNAME
1 change: 1 addition & 0 deletions frontend/vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ import react from '@vitejs/plugin-react-swc'
// https://vitejs.dev/config/
export default defineConfig({
plugins: [react()],
base: "/teamagochi/frontend/"
})

0 comments on commit c19ad66

Please sign in to comment.