-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
name: Publish to GitHub Pages | ||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: # Allows you to run the workflow manually | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: oven-sh/setup-bun@v2 | ||
with: | ||
bun-version-file: '.bun-version' | ||
- run: bun install | ||
- name: Build with repository name as base path | ||
env: | ||
PUBLIC_ENV__BASE_URL: /${{ github.event.repository.name }} | ||
run: bun run build -- --base /${{ github.event.repository.name }} | ||
- name: Configure Pages (if this fails, set Pages source to GitHub Actions in repo settings) | ||
uses: actions/configure-pages@v5 | ||
- name: Upload pages artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./dist/client | ||
|
||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
|
||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
pages: write # To deploy to Pages | ||
id-token: write # To verify the deployment originates from an appropriate source | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: ${{ github.workflow }}-deploy | ||
|
||
steps: | ||
- name: Deploy pages artifact | ||
uses: actions/deploy-pages@v4 | ||
id: deployment |