Skip to content

Commit b3e30ed

Browse files
committed
Fixed docusaurus config and added new GH CI build script
1 parent afdcf02 commit b3e30ed

File tree

2 files changed

+33
-19
lines changed

2 files changed

+33
-19
lines changed

.github/workflows/deploy.yml

Lines changed: 28 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,27 +8,44 @@ on:
88
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
99

1010
jobs:
11-
deploy:
12-
name: Deploy to GitHub Pages
11+
build:
12+
name: Build Docusaurus
1313
runs-on: ubuntu-latest
1414
steps:
1515
- uses: actions/checkout@v4
16-
- uses: actions/[email protected]
1716
with:
18-
node-version: 20
17+
fetch-depth: 0
18+
- uses: actions/setup-node@v4
19+
with:
20+
node-version: 18
1921
cache: npm
2022

2123
- name: Install dependencies
2224
run: npm ci
2325
- name: Build website
2426
run: npm run build
2527

26-
# Popular action to deploy to GitHub Pages:
27-
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
28-
- name: Deploy to GitHub Pages
29-
uses: peaceiris/actions-gh-pages@v3
28+
- name: Upload Build Artifact
29+
uses: actions/upload-pages-artifact@v3
3030
with:
31-
github_token: ${{ secrets.GH_TOKEN }}
32-
# Build output to publish to the `gh-pages` branch:
33-
publish_dir: ./build
31+
path: /build
32+
33+
deploy:
34+
name: Deploy to GitHub Pages
35+
needs: build
36+
37+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
38+
permissions:
39+
pages: write # to deploy to Pages
40+
id-token: write # to verify the deployment originates from an appropriate source
41+
42+
# Deploy to the github-pages environment
43+
environment:
44+
name: github-pages
45+
url: ${{ steps.deployment.outputs.page_url }}
3446

47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

docusaurus.config.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -55,24 +55,20 @@ const footerLinks = [
5555
},
5656
{
5757
label: "Forums",
58-
href: `https://www.mongodb.com/community/forums/${utmParams}`,
58+
href: `https://www.mongodb.com/community/forums?${utmParams}`,
5959
},
6060
{
6161
label: "Developer Center",
62-
href: `https://www.mongodb.com/developer/${utmParams}`,
62+
href: `https://www.mongodb.com/developer?${utmParams}`,
6363
},
6464
{
6565
label: "MongoDB University",
66-
href: `https://learn.mongodb.com/${utmParams}`,
66+
href: `https://learn.mongodb.com?${utmParams}`,
6767
},
6868
{
69-
href: `https://github.com/${organizationName}/${workshopName}`,
69+
href: `https://github.com?${organizationName}/${workshopName}`,
7070
label: "This lab in GitHub",
7171
},
72-
{
73-
label: ${new Date().getFullYear()} MongoDB, Inc.`,
74-
href: "#",
75-
},
7672
];
7773

7874
///////////////////////////////////////////////////////////////////////////////
@@ -155,6 +151,7 @@ const config = {
155151
footer: {
156152
style: "dark",
157153
links: footerLinks,
154+
copyright: ${new Date().getFullYear()} MongoDB, Inc.`,
158155
},
159156
prism: {
160157
theme: lightCodeTheme,

0 commit comments

Comments
 (0)