Skip to content

Commit 5bd2e17

Browse files
committed
add docs site deploy yml
1 parent 1167481 commit 5bd2e17

File tree

2 files changed

+89
-32
lines changed

2 files changed

+89
-32
lines changed

.github/workflows/docs-deploy.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy Docs 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@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Enable Corepack
18+
run: corepack enable
19+
- uses: actions/setup-node@v4
20+
with:
21+
node-version: "lts/*"
22+
cache: yarn
23+
24+
- name: Install dependencies
25+
run: yarn install --frozen-lockfile
26+
27+
- name: Build docs website
28+
run: yarn workspace docs build
29+
30+
- name: Upload Build Artifact
31+
uses: actions/upload-pages-artifact@v3
32+
with:
33+
path: ./docs/build
34+
35+
deploy:
36+
name: Deploy to GitHub Pages
37+
needs: build
38+
39+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
40+
permissions:
41+
pages: write # to deploy to Pages
42+
id-token: write # to verify the deployment originates from an appropriate source
43+
44+
# Deploy to the github-pages environment
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
49+
runs-on: ubuntu-latest
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v4

docs/docusaurus.config.ts

Lines changed: 36 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,21 @@ import { themes as prismThemes } from 'prism-react-renderer'
55
// This runs in Node.js - Don't use client-side code here (browser APIs, JSX...)
66

77
const config: Config = {
8-
title: 'My Site',
9-
tagline: 'Dinosaurs are cool',
8+
title: 'FS Prober',
9+
tagline: 'fs-prober helps you extract file and folder structures from user inputs in Browsers.',
1010
favicon: 'img/favicon.ico',
1111

1212
// Set the production url of your site here
13-
url: 'https://your-docusaurus-site.example.com',
13+
url: 'https://stacknide.github.io/',
1414
// Set the /<baseUrl>/ pathname under which your site is served
1515
// For GitHub pages deployment, it is often '/<projectName>/'
16-
baseUrl: '/',
16+
baseUrl: '/fs-prober/',
1717

1818
// GitHub pages deployment config.
1919
// If you aren't using GitHub pages, you don't need these.
20-
organizationName: 'facebook', // Usually your GitHub org/user name.
21-
projectName: 'docusaurus', // Usually your repo name.
20+
organizationName: 'stacknide', // Usually your GitHub org/user name.
21+
projectName: 'fs-prober', // Usually your repo name.
22+
trailingSlash: false,
2223

2324
onBrokenLinks: 'throw',
2425
onBrokenMarkdownLinks: 'warn',
@@ -39,8 +40,7 @@ const config: Config = {
3940
sidebarPath: './sidebars.ts',
4041
// Please change this to your repo.
4142
// Remove this to remove the "edit this page" links.
42-
editUrl:
43-
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
43+
editUrl: 'https://github.com/stacknide/fs-prober/tree/main/docs',
4444
},
4545
blog: {
4646
showReadingTime: true,
@@ -50,8 +50,7 @@ const config: Config = {
5050
},
5151
// Please change this to your repo.
5252
// Remove this to remove the "edit this page" links.
53-
editUrl:
54-
'https://github.com/facebook/docusaurus/tree/main/packages/create-docusaurus/templates/shared/',
53+
editUrl: 'https://github.com/stacknide/fs-prober/tree/main/docs',
5554
// Useful options to enforce blogging best practices
5655
onInlineTags: 'warn',
5756
onInlineAuthors: 'warn',
@@ -68,9 +67,9 @@ const config: Config = {
6867
// Replace with your project's social card
6968
image: 'img/docusaurus-social-card.jpg',
7069
navbar: {
71-
title: 'My Site',
70+
title: 'FS Prober',
7271
logo: {
73-
alt: 'My Site Logo',
72+
alt: 'FS Prober',
7473
src: 'img/logo.svg',
7574
},
7675
items: [
@@ -82,7 +81,7 @@ const config: Config = {
8281
},
8382
{ to: '/blog', label: 'Blog', position: 'left' },
8483
{
85-
href: 'https://github.com/facebook/docusaurus',
84+
href: 'https://github.com/stacknide/fs-prober',
8685
label: 'GitHub',
8786
position: 'right',
8887
},
@@ -96,42 +95,47 @@ const config: Config = {
9695
items: [
9796
{
9897
label: 'Tutorial',
99-
to: '/docs/intro',
98+
to: '/docs/getting-started',
10099
},
101100
],
102101
},
102+
// {
103+
// title: 'Community',
104+
// items: [
105+
// {
106+
// label: 'GitHub',
107+
// href: 'https://github.com/stacknide',
108+
// },
109+
// {
110+
// label: 'Discord',
111+
// href: 'https://discordapp.com/invite/docusaurus',
112+
// },
113+
// {
114+
// label: 'X',
115+
// href: 'https://x.com/docusaurus',
116+
// },
117+
// ],
118+
// },
103119
{
104-
title: 'Community',
120+
title: 'More',
105121
items: [
106122
{
107-
label: 'Stack Overflow',
108-
href: 'https://stackoverflow.com/questions/tagged/docusaurus',
109-
},
110-
{
111-
label: 'Discord',
112-
href: 'https://discordapp.com/invite/docusaurus',
113-
},
114-
{
115-
label: 'X',
116-
href: 'https://x.com/docusaurus',
123+
label: 'Blog',
124+
to: '/blog',
117125
},
118126
],
119127
},
120128
{
121-
title: 'More',
129+
title: 'Links',
122130
items: [
123-
{
124-
label: 'Blog',
125-
to: '/blog',
126-
},
127131
{
128132
label: 'GitHub',
129-
href: 'https://github.com/facebook/docusaurus',
133+
href: 'https://github.com/stacknide',
130134
},
131135
],
132136
},
133137
],
134-
copyright: `Copyright © ${new Date().getFullYear()} My Project, Inc. Built with Docusaurus.`,
138+
copyright: `Copyright © ${new Date().getFullYear()} Stacknide.`,
135139
},
136140
prism: {
137141
theme: prismThemes.github,

0 commit comments

Comments
 (0)