Skip to content

Commit b783eb4

Browse files
committed
adding docusaurus gh action + disabling mkdocs
1 parent ec4e2b8 commit b783eb4

File tree

5 files changed

+51
-3
lines changed

5 files changed

+51
-3
lines changed

.github/workflows/docusaurus.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy Docusaurus to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
paths:
7+
- docusaurus/**
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: write
12+
13+
concurrency:
14+
group: pages
15+
cancel-in-progress: true
16+
17+
jobs:
18+
deploy:
19+
runs-on: ubuntu-latest
20+
defaults:
21+
run:
22+
working-directory: docusaurus
23+
24+
steps:
25+
- name: Checkout
26+
uses: actions/checkout@v4
27+
28+
- name: Setup Node
29+
uses: actions/setup-node@v4
30+
with:
31+
node-version: 20
32+
cache: npm
33+
cache-dependency-path: docusaurus/package-lock.json
34+
35+
- name: Install
36+
run: npm ci
37+
38+
- name: Build
39+
run: npm run build
40+
41+
- name: Deploy to gh-pages
42+
uses: peaceiris/actions-gh-pages@v4
43+
with:
44+
github_token: ${{ secrets.GITHUB_TOKEN }}
45+
publish_dir: docusaurus/build
46+
publish_branch: gh-pages-docusaurus

docusaurus/docusaurus.config.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,17 @@ const config: Config = {
1616
},
1717

1818
// Set the production url of your site here
19-
url: 'https://docs.codacy.com',
19+
// once we configure it to be in docs.codacy.com, we change this to "docs.codacy.com"
20+
url: 'https://codacy.github.io',
2021
// Set the /<baseUrl>/ pathname under which your site is served
2122
// For GitHub pages deployment, it is often '/<projectName>/'
22-
baseUrl: '/',
23+
// once we configure it to be in docs.codacy.com, we change this to "/"
24+
baseUrl: '/docs-docusaurus/',
2325

2426
// GitHub pages deployment config.
2527
// If you aren't using GitHub pages, you don't need these.
2628
organizationName: 'Codacy', // Usually your GitHub org/user name.
27-
projectName: 'docs', // Usually your repo name.
29+
projectName: 'docs-docusaurus', // Usually your repo name.
2830

2931
onBrokenLinks: 'warn',
3032
markdown: {

0 commit comments

Comments
 (0)