Skip to content

Commit 186cb2b

Browse files
author
Lévai Norbert
committed
Update Github pages deploy
1 parent bbbb99c commit 186cb2b

File tree

3 files changed

+53
-30
lines changed

3 files changed

+53
-30
lines changed

.github/workflows/deploy-docs.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/docs.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: docs
2+
3+
on:
4+
# trigger deployment on every push to main branch
5+
push:
6+
branches: [master]
7+
# trigger deployment manually
8+
workflow_dispatch:
9+
10+
jobs:
11+
docs:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v4
16+
with:
17+
# fetch all commits to get last updated time or other git log info
18+
fetch-depth: 0
19+
20+
- name: Setup pnpm
21+
uses: pnpm/action-setup@v2
22+
with:
23+
# choose pnpm version to use
24+
version: 8
25+
# install deps with pnpm
26+
run_install: true
27+
28+
- name: Setup Node.js
29+
uses: actions/setup-node@v4
30+
with:
31+
# choose node.js version to use
32+
node-version: 20
33+
# cache deps for pnpm
34+
cache: pnpm
35+
36+
# run build script
37+
- name: Build VuePress site
38+
run: pnpm docs:build
39+
40+
# please check out the docs of the workflow for more details
41+
# @see https://github.com/crazy-max/ghaction-github-pages
42+
- name: Deploy to GitHub Pages
43+
uses: crazy-max/ghaction-github-pages@v4
44+
with:
45+
# deploy to gh-pages branch
46+
target_branch: gh-pages
47+
# deploy the default output dir of VuePress
48+
build_dir: docs/.vuepress/dist
49+
env:
50+
# @see https://docs.github.com/en/actions/reference/authentication-in-a-workflow#about-the-github_token-secret
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

docs/.vuepress/config.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export default defineUserConfig({
1313
logo: '',
1414
contributors: false,
1515

16+
base: '/docs-bitcr/',
17+
1618
navbar: [
1719
{ text: 'E-Bill', link: '/e-bill/' },
1820
{ text: 'Wildcat Mint', link: '/wildcat-mint/' },

0 commit comments

Comments
 (0)