Skip to content

Commit b057e3c

Browse files
committed
docs: Add docusaurus site
1 parent 9f97c94 commit b057e3c

24 files changed

+19938
-8
lines changed

.devcontainer/devcontainer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"hbenl.vscode-mocha-test-adapter",
1919
"dbaeumer.vscode-eslint",
2020
"tamasfe.even-better-toml",
21-
"TakumiI.markdowntable"
21+
"TakumiI.markdowntable",
22+
"unifiedjs.vscode-mdx"
2223
]
2324
}
2425
}

.dockerignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ config/*.p8
1717
.flatpak-builder
1818
**/generated-sources.*
1919
flatpak/.flatpak-builder
20-
docsite/build
21-
docsite/node_modules
22-
docsite/.docusaurus
23-
docsite/.cache-loader
20+
docsite
2421
build
2522
*.secrets
2623
.devcontainer

.github/workflows/docsDeploy.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [released]
7+
# Review gh actions docs if you want to further define triggers, paths, etc
8+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
9+
10+
jobs:
11+
deploy:
12+
name: Deploy to GitHub Pages
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: actions/setup-node@v4
17+
with:
18+
node-version: 20
19+
cache: npm
20+
21+
- name: Install app dev dependencies
22+
run: npm ci
23+
24+
- name: Install docusaurus dependencies
25+
run: npm ci
26+
working-directory: ./docsite
27+
- name: Build website
28+
env:
29+
RY_ANALYTICS: ${{ vars.RY_ANALYTICS }}
30+
RY_ANALYTICS_SITEID: ${{ vars.RY_ANALYTICS_SITEID }}
31+
RY_ANALYTICS_REPLAY: ${{ vars.RY_ANALYTICS_REPLAY }}
32+
GSITEVERIFICATION: ${{ vars.GSITEVERIFICATION }}
33+
DOCS_BASE: '/komodo-import'
34+
run: npm run build
35+
working-directory: ./docsite
36+
37+
# Popular action to deploy to GitHub Pages:
38+
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus
39+
- name: Deploy to GitHub Pages
40+
uses: peaceiris/actions-gh-pages@v3
41+
with:
42+
github_token: ${{ secrets.GITHUB_TOKEN }}
43+
# Build output to publish to the `gh-pages` branch:
44+
publish_dir: ./docsite/build
45+
# The following lines assign commit authorship to the official
46+
# GH-Actions bot for deploys to `gh-pages` branch:
47+
# https://github.com/actions/checkout/issues/13#issuecomment-724415212
48+
# The GH actions bot is used by default if you didn't specify the two fields.
49+
# You can swap them out with your own user credentials.
50+
user_name: github-actions[bot]
51+
user_email: 41898282+github-actions[bot]@users.noreply.github.com

Dockerfile

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,7 @@ ENV TZ=Etc/GMT \
1010
COLORED_STD=true \
1111
FILES_ON_SERVER_DIR=/filesOnServer
1212

13-
FROM base as app
14-
15-
USER 1000
13+
FROM base as builder
1614

1715
WORKDIR /usr/src/app
1816

@@ -23,4 +21,12 @@ RUN npm install --omit=dev \
2321
&& chown -R node:node node_modules \
2422
&& rm -rf node_modules/@types
2523

24+
FROM base as app
25+
26+
USER 1000
27+
28+
WORKDIR /usr/src/app
29+
30+
COPY --chown=node:node --from=builder /usr/src/app /usr/src/app
31+
2632
CMD ["dumb-init", "node", "/usr/src/app/node_modules/.bin/tsx", "/usr/src/app/src/index.ts"]

docsite/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

docsite/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Website
2+
3+
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
4+
5+
### Installation
6+
7+
```
8+
$ yarn
9+
```
10+
11+
### Local Development
12+
13+
```
14+
$ yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
### Build
20+
21+
```
22+
$ yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
### Deployment
28+
29+
Using SSH:
30+
31+
```
32+
$ USE_SSH=true yarn deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```
38+
$ GIT_USER=<Your GitHub username> yarn deploy
39+
```
40+
41+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

docsite/docs/FAQ.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
toc_min_heading_level: 2
3+
toc_max_heading_level: 5
4+
---
5+
6+
dfsdfsd
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "Installation",
3+
"position": 2,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "Way to install Multi-Scrobbler"
7+
}
8+
}

0 commit comments

Comments
 (0)