Skip to content

Commit

Permalink
add docs deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
dafengzhen committed Mar 16, 2024
1 parent 8130a20 commit 867cbce
Show file tree
Hide file tree
Showing 4 changed files with 81 additions and 29 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Deploy Youdeyiwu Docs site to Pages

on:
push:
branches: [ main ]

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
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Install dependencies
run: npm ci
- name: Build with Youdeyiwu Docs
run: npm run build
- name: Upload 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
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default defineConfig({
root: { label: 'English', ...en },
zh: { label: '简体中文', ...zh },
},
base: '/docs/',
base: '/youdeyiwu/',
cleanUrls: true,
title: 'Youdeyiwu',
description: 'Youdeyiwu is an open-source lightweight forum',
Expand Down
50 changes: 25 additions & 25 deletions web/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
},
"dependencies": {
"@popperjs/core": "^2.11.8",
"@tanstack/react-query": "^5.28.2",
"@tanstack/react-query-devtools": "^5.28.2",
"@tanstack/react-query": "^5.28.4",
"@tanstack/react-query-devtools": "^5.28.4",
"animate.css": "^4.1.1",
"bootstrap": "^5.3.3",
"bootstrap-icons": "^1.11.3",
Expand All @@ -23,7 +23,7 @@
"highlight.js": "^11.9.0",
"nanoid": "^5.0.6",
"next": "14.1.3",
"next-intl": "^3.9.4",
"next-intl": "^3.9.5",
"photoswipe": "^5.4.3",
"query-string": "^9.0.0",
"react": "^18",
Expand Down

0 comments on commit 867cbce

Please sign in to comment.