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

Commit

Permalink
update deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
HexaField committed Jul 8, 2023
1 parent 44f9ded commit 2a77d3c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deploy-static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
key: ${{ runner.os }}-branch-build-${{ hashFiles('**/package.json') }}
- run: cp .env.local.default .env.local
- run: npm install --production=false --loglevel notice --legacy-peer-deps
- run: cd './packages/projects/projects/${{ github.event.repository.name }}' && npm run build
- run: cd './packages/projects/projects/${{ github.event.repository.name }}' && npx cross-env STATIC_BUILD_HOST=${{ secrets.STATIC_BUILD_HOST }} npm run build
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Upload artifact
Expand Down
5 changes: 3 additions & 2 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,6 @@ Build the client by itself. No servers, lightweight, and entirely customizable.

## Deploy to github pages

- Set STATIC_BUILD_ENABLED to true in repo secrets
- Set GITHUB_PAGES to true in repo secrets
- Set STATIC_BUILD_ENABLED to `true` in repo secrets
- Set GITHUB_PAGES to `true` in repo secrets
- Set STATIC_BUILD_HOST to your github pages url in repo secrets without https:// (example: `username.github.io/repo-name`)
2 changes: 1 addition & 1 deletion vite.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default defineConfig(async () => {

const isDevOrLocal = process.env.APP_ENV === 'development' || process.env.VITE_LOCAL_BUILD === 'true'

let base = `https://${process.env['APP_HOST'] ? process.env['APP_HOST'] : process.env['VITE_APP_HOST']}/`
const base = `https://${process.env['STATIC_BUILD_HOST'] ?? 'localhost:3000'}/`

const returned = {
server: {
Expand Down

0 comments on commit 2a77d3c

Please sign in to comment.