Skip to content

Commit 048adfb

Browse files
committed
chore: deploy
1 parent e22fc47 commit 048adfb

7 files changed

Lines changed: 665 additions & 129 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Deploy Frontend to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
publish:
10+
permissions:
11+
contents: write
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Check out repository
15+
uses: actions/checkout@v4
16+
17+
- name: Clear and create .env file
18+
run: |
19+
cd frontend
20+
echo "" > .env
21+
echo "VITE_SUPABASE_URL=${{ secrets.VITE_SUPABASE_URL }}" >> .env
22+
echo "VITE_SUPABASE_PUBLISHABLE_DEFAULT_KEY=${{ secrets.VITE_SUPABASE_PUBLISHABLE_DEFAULT_KEY }}" >> .env
23+
- name: Install dependencies
24+
run: |
25+
cd frontend
26+
npm install
27+
28+
- name: Build project
29+
run: |
30+
cd frontend
31+
npm run build
32+
33+
- name: Set Git identity
34+
run: |
35+
git config --global user.email "github-actions@github.com"
36+
git config --global user.name "github-actions[bot]"
37+
38+
- name: Deploy using npm script
39+
run: |
40+
cd frontend
41+
git remote set-url origin https://x-access-token:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}.git
42+
npm run deploy
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
46+
- name: Publish to GitHub Pages
47+
uses: peaceiris/actions-gh-pages@v3
48+
with:
49+
github_token: ${{ secrets.GITHUB_TOKEN }}
50+
publish_dir: ./web/dist

web/README.md

Lines changed: 0 additions & 89 deletions
This file was deleted.

web/env.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
VITE_SUPABASE_URL=
2+
VITE_SUPABASE_PUBLISHABLE_DEFAULT_KEY=

0 commit comments

Comments
 (0)