Skip to content

Commit b00bf5a

Browse files
committed
initial structure
1 parent 36788a5 commit b00bf5a

File tree

30 files changed

+1153
-0
lines changed

30 files changed

+1153
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
paths:
8+
- 'docsite/**'
9+
- '!docsite/README.md'
10+
- '.github/deploy-gh-pages.yml'
11+
# Review gh actions docs if you want to further define triggers, paths, etc
12+
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on
13+
14+
jobs:
15+
build:
16+
name: Build Docusaurus
17+
runs-on: ubuntu-latest
18+
defaults:
19+
run:
20+
working-directory: ./docsite
21+
steps:
22+
- uses: actions/checkout@v4
23+
with:
24+
fetch-depth: 0
25+
- uses: actions/setup-node@v4
26+
with:
27+
node-version: 22
28+
cache: npm
29+
cache-dependency-path: './docsite/package-lock.json'
30+
31+
- name: Install dependencies
32+
run: npm ci
33+
- name: Build website
34+
run: npm run build
35+
36+
- name: Upload Build Artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: docsite/build
40+
41+
deploy:
42+
name: Deploy to GitHub Pages
43+
needs: build
44+
45+
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
46+
permissions:
47+
pages: write # to deploy to Pages
48+
id-token: write # to verify the deployment originates from an appropriate source
49+
50+
# Deploy to the github-pages environment
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
55+
runs-on: ubuntu-latest
56+
steps:
57+
- name: Deploy to GitHub Pages
58+
id: deployment
59+
uses: actions/deploy-pages@v4
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Test pages deployment
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
paths:
8+
- 'docsite/**'
9+
10+
11+
jobs:
12+
test-deploy:
13+
name: Test deployment
14+
runs-on: ubuntu-latest
15+
defaults:
16+
run:
17+
working-directory: ./docsite
18+
steps:
19+
- uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- uses: actions/setup-node@v4
23+
with:
24+
node-version: 22
25+
cache: npm
26+
cache-dependency-path: './docsite/package-lock.json'
27+
28+
- name: Install dependencies
29+
run: npm ci
30+
- name: Test build website
31+
run: npm run build

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: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Website
2+
3+
This website is built using [Docusaurus](https://docusaurus.io/), a modern static website generator.
4+
5+
## Installation
6+
7+
```sh
8+
npm install
9+
```
10+
11+
## Local Development
12+
13+
```sh
14+
npm 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+
```sh
22+
npm 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+
```sh
32+
USE_SSH=true npm deploy
33+
```
34+
35+
Not using SSH:
36+
37+
```sh
38+
GIT_USER=<Your GitHub username> npm 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.
42+
43+
## Notes
44+
45+
- `npm install --save @docusaurus/plugin-client-redirects` to support redirect from `/docs/` to `/docs/intro`
46+
- redirect gh-actions to master
47+
- logo works in wip
48+
- prism `additionalLanguages: ['abap']`
49+
- add google analytics
50+
- if blog link is above `truncate` is must be complete (start with `/`), otherwise will be broken on tags page
51+
- change Repo/Settings/Pages/Source to Github actions (otherwise does not deploy from GA) - after that the pages are based on the GA artifact not the `gh-pages` branch! (TODO: maybe check how to deploy to a branch ... but maybe not)
52+
- to add search, apply for Algolia

0 commit comments

Comments
 (0)