Skip to content

Commit 4a84fcf

Browse files
committed
ci: add workflows to deploy to GH Pages
1 parent aca3df6 commit 4a84fcf

3 files changed

Lines changed: 72 additions & 1 deletion

File tree

.github/workflows/deploy.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
name: Build Docusaurus
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v6
14+
with:
15+
fetch-depth: 0
16+
- uses: actions/setup-node@v6
17+
with:
18+
node-version: lts/*
19+
cache: npm
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
- name: Build website
24+
run: npm run build
25+
26+
- name: Upload Build Artifact
27+
uses: actions/upload-pages-artifact@v5
28+
with:
29+
path: build
30+
31+
deploy:
32+
name: Deploy to GitHub Pages
33+
needs: build
34+
35+
permissions:
36+
pages: write
37+
id-token: write
38+
39+
environment:
40+
name: github-pages
41+
url: ${{ steps.deployment.outputs.page_url }}
42+
43+
runs-on: ubuntu-latest
44+
steps:
45+
- name: Deploy to GitHub Pages
46+
id: deployment
47+
uses: actions/deploy-pages@v5

.github/workflows/test-deploy.yaml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Test deployment
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
test-deploy:
10+
name: Test deployment
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v6
14+
with:
15+
fetch-depth: 0
16+
- uses: actions/setup-node@v6
17+
with:
18+
node-version: lts/*
19+
cache: npm
20+
21+
- name: Install dependencies
22+
run: npm ci
23+
- name: Test build website
24+
run: npm run build

docusaurus.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ const config = {
1313
favicon: 'img/favicon.ico',
1414
organizationName: 'ProBotOrg',
1515
projectName: 'docs',
16-
16+
trailingSlash: false,
1717
i18n: {
1818
defaultLocale: 'en',
1919
locales: ['en', 'ar', 'es', 'fr', 'tr', 'vi', 'ru', 'de', 'ja', 'ku'],

0 commit comments

Comments
 (0)