Skip to content

Commit 2cc95b5

Browse files
committed
deploy: force deploy
1 parent 1d56f0e commit 2cc95b5

File tree

2 files changed

+45
-12
lines changed

2 files changed

+45
-12
lines changed

.github/workflows/deploy.yml

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,10 @@ on:
66
branches: master
77

88
jobs:
9-
deploy:
10-
name: Deploy
9+
deploy-to-deno:
10+
name: Deploy to Deno
1111
runs-on: ubuntu-latest
12+
environment: 'production'
1213

1314
permissions:
1415
id-token: write # Needed for auth with Deno Deploy
@@ -29,16 +30,46 @@ jobs:
2930
node-version: lts/*
3031

3132
- name: Install step
32-
run: "npm install"
33+
run: 'npm install'
34+
35+
- name: Create .env.production
36+
run: |
37+
echo "VITE_API_URL=${{ secrets.VITE_API_URL }}" > .env.production
3338
3439
- name: Build step
35-
run: "npm run build"
40+
run: 'npm run build'
3641

3742
- name: Upload to Deno Deploy
3843
uses: denoland/deployctl@v1
3944
with:
40-
project: "lift-frontend"
41-
entrypoint: "https://deno.land/[email protected]/http/file_server.ts"
42-
root: "dist"
43-
44-
45+
project: 'lift-frontend'
46+
entrypoint: 'https://deno.land/[email protected]/http/file_server.ts'
47+
root: 'dist'
48+
49+
# deploy-to-github-pages:
50+
# name: Deploy to GitHub Pages.
51+
# runs-on: ubuntu-latest
52+
# needs: deploy-to-deno # Ensures Deno Deploy finishes first
53+
54+
# steps:
55+
# - name: Clone repository
56+
# uses: actions/checkout@v4
57+
58+
# - name: Install Node.js
59+
# uses: actions/setup-node@v4
60+
# with:
61+
# node-version: lts/*
62+
63+
# - name: Install dependencies
64+
# run: npm install
65+
66+
# - name: Build project
67+
# run: npm run build
68+
69+
# - name: Deploy to GitHub Pages
70+
# uses: peaceiris/actions-gh-pages@v3
71+
# with:
72+
# github_token: ${{ secrets.GITHUB_TOKEN }}
73+
# publish_dir: ./dist
74+
# publish_branch: gh-pages # Ensure it's pushing to the correct branch
75+
# force_orphan: true # Ensure it overwrites the previous deployment.

package.json

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,12 @@
44
"version": "0.0.0",
55
"type": "module",
66
"scripts": {
7-
"dev": "vite",
8-
"build": "tsc -b && vite build",
7+
"dev": "vite --mode development",
8+
"prod": "vite --mode production",
9+
"build": "tsc -b && vite build --mode production",
910
"lint": "eslint .",
10-
"preview": "vite preview"
11+
"preview": "vite preview --mode production",
12+
"deploy": "npm run build && gh-pages -d dist"
1113
},
1214
"dependencies": {
1315
"@radix-ui/react-dialog": "^1.1.6",

0 commit comments

Comments
 (0)