Skip to content

Commit

Permalink
Add github pages deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
mz8i committed Nov 18, 2024
1 parent b4b0bc6 commit c7f6b2c
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/deploy.yaml
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

0 comments on commit c7f6b2c

Please sign in to comment.