ci(docs): add GitHub Actions workflow and base path for automated GitHub Pages deployment
This commit is contained in:
parent
404e82abf6
commit
7a7eab46e5
2 changed files with 64 additions and 0 deletions
63
.github/workflows/deploy-docs.yml
vendored
Normal file
63
.github/workflows/deploy-docs.yml
vendored
Normal file
|
|
@ -0,0 +1,63 @@
|
||||||
|
name: Deploy Documentation
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- 'docs/**'
|
||||||
|
- '.github/workflows/deploy-docs.yml'
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: pages
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: 20
|
||||||
|
cache: npm
|
||||||
|
cache-dependency-path: docs/package-lock.json
|
||||||
|
|
||||||
|
- name: Setup Pages
|
||||||
|
uses: actions/configure-pages@v4
|
||||||
|
|
||||||
|
- name: Install documentation dependencies
|
||||||
|
run: npm ci
|
||||||
|
working-directory: docs
|
||||||
|
|
||||||
|
- name: Build VitePress documentation
|
||||||
|
run: npm run build
|
||||||
|
working-directory: docs
|
||||||
|
|
||||||
|
- name: Upload Pages artifact
|
||||||
|
uses: actions/upload-pages-artifact@v3
|
||||||
|
with:
|
||||||
|
path: docs/.vitepress/dist
|
||||||
|
|
||||||
|
deploy:
|
||||||
|
environment:
|
||||||
|
name: github-pages
|
||||||
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
|
needs: build
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Deploy to GitHub Pages
|
||||||
|
id: deployment
|
||||||
|
uses: actions/deploy-pages@v4
|
||||||
|
|
@ -3,6 +3,7 @@ import { defineConfig } from 'vitepress';
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
title: 'BetterCurseForge',
|
title: 'BetterCurseForge',
|
||||||
description: 'Client mod for CurseForge Launcher',
|
description: 'Client mod for CurseForge Launcher',
|
||||||
|
base: process.env.BASE_URL || '/BetterCurseForge/',
|
||||||
appearance: 'dark',
|
appearance: 'dark',
|
||||||
lastUpdated: true,
|
lastUpdated: true,
|
||||||
cleanUrls: true,
|
cleanUrls: true,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue