Skip to content

feat(website): docusaurus site published from /docs #1

feat(website): docusaurus site published from /docs

feat(website): docusaurus site published from /docs #1

Workflow file for this run

name: Deploy Docs Website
on:
push:
branches: [main]
paths:
- 'website/**'
- 'docs/**'
- '.github/workflows/deploy-docs.yml'
pull_request:
branches: [main]
paths:
- 'website/**'
- 'docs/**'
- '.github/workflows/deploy-docs.yml'
permissions:
contents: read
jobs:
build:
name: Build website
runs-on: ubuntu-latest
timeout-minutes: 15
defaults:
run:
working-directory: website
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with:
bun-version: 1.3.11
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Build website
run: bun run build
- name: Upload build artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: website-build
path: website/build
retention-days: 7
deploy:
name: Deploy to GitHub Pages
needs: build
runs-on: ubuntu-latest
timeout-minutes: 10
# Only publish on push to main on the canonical repo. PR builds verify the
# build but never deploy. The contents: write permission is scoped to this
# job alone so PR builds keep a read-only token.
if: github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository == 'kaito-project/airunway'
permissions:
contents: write
steps:
- name: Download build artifact
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53 # v6.0.0
with:
name: website-build
path: build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build