fix: updated base paths for github pages hosting #21
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
# To get started with Next.js see: https://nextjs.org/docs/getting-started | |
# | |
name: Deploy Docs site to Pages | |
on: | |
# Runs on pushes targeting the default branch | |
push: | |
branches: ["develop"] | |
paths: | |
- "documentation/occupi-docs/**" | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
defaults: | |
run: | |
working-directory: documentation/occupi-docs | |
jobs: | |
# Build job | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: latest # or "latest", "canary", <sha> | |
- name: Setup Pages | |
uses: actions/configure-pages@v4 | |
with: | |
# Automatically inject basePath in your Next.js configuration file and disable | |
# server side image optimization (https://nextjs.org/docs/api-reference/next/image#unoptimized). | |
# | |
# You may remove this line if you want to manage the configuration yourself. | |
static_site_generator: next | |
- name: Install dependencies with Bun | |
run: bun install | |
- name: Build with Next.js | |
run: bun run build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: documentation/occupi-docs/out | |
# Deployment job | |
deploy: | |
name: Deploy to GitHub Pages | |
needs: build | |
# 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 | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |