Merge pull request #56 from COS301-SE-2024/feat/backend/view-my-booki… #26
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
name: Deploy Docs site to Pages | |
on: | |
push: | |
branches: ["develop"] | |
paths: [ | |
"documentation/occupi-docs/pages/**", | |
"documentation/occupi-docs/components/**", | |
"documentation/occupi-docs/.gitignore", | |
"documentation/occupi-docs/next.config.js", | |
"documentation/occupi-docs/package.json", | |
"documentation/occupi-docs/theme.config.tsx", | |
"documentation/occupi-docs/tsconfig.json" | |
] | |
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 |