Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(other): add gitbook action #6690

Closed
wants to merge 22 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
8646d75
Add Gitbook action
Tirokk Aug 15, 2023
65faf07
Add file 'book.json'
Tirokk Aug 15, 2023
c9097e1
Fix markdown'hint'
Tirokk Aug 15, 2023
87beb10
Fix again markdown 'hint'
Tirokk Aug 15, 2023
462d4e5
Fix again markdown 'hint'
Tirokk Aug 15, 2023
2807f96
Fix again markdown 'hint'
Tirokk Aug 15, 2023
2a85ee4
Fix again markdown 'hint'
Tirokk Aug 15, 2023
7e196ac
Fix again markdown 'hint'
Tirokk Aug 15, 2023
8049d35
Fix markdown by removing file 'edit-this-documentation.md'
Tirokk Aug 15, 2023
52ff104
Set 'publish_branch: 6689-setup-gitbook-action'
Tirokk Aug 15, 2023
960a503
Set 'source_branch: 6689-setup-gitbook-action' and 'publish_branch: d…
Tirokk Aug 15, 2023
6c3a303
Revert "Fix markdown by removing file 'edit-this-documentation.md'"
Tirokk Aug 15, 2023
01c8b59
Add plug-ins for 'hints' and 'tabs'
Tirokk Aug 15, 2023
cb57667
Update plug-in for 'tabs' to 'tabs2'
Tirokk Aug 15, 2023
65ed035
Change 'publish_dir: gitbook-docs' to 'publish_dir: docs'
Tirokk Aug 15, 2023
2f70de3
Set 'publish_repo: Ocelot-Social-Community/docs.ocelot.social' and 'p…
Tirokk Aug 16, 2023
9d7492b
Merge branch 'master' into 6689-setup-gitbook-action
mahula Oct 27, 2023
21a6c2d
change gitbook-action.yml for testpursoses
mahula Oct 27, 2023
fd90bed
set gitbook to ignore all files not except.md files
mahula Oct 27, 2023
cc1dceb
change gitbook output target in workflow file
mahula Oct 27, 2023
c193d8d
upgrade github checkout action to current version
mahula Oct 27, 2023
24a7f69
add logo to gitbook config
mahula Nov 16, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitbookignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore all files except .md files
*

# Include .md files
!*.md
47 changes: 47 additions & 0 deletions .github/workflows/gitbook-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 'Gitbook-Action'


on:
push:
branches:
- master
- 6689-setup-gitbook-action # just for testing, do remove afterwards
paths-ignore:
- 'gitbook-docs/**' # To Avoid Loop

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout action
uses: actions/checkout@v4

- name: Gitbook Action # https://github.com/ZanderZhao/gitbook-action/releases
uses: ZanderZhao/gitbook-action@master # -> or ZanderZhao/[email protected], Just example, click above, use latest please
with: # or fork this repo and use YourName/gitbook-action@master
token: ${{ secrets.GITBOOK_ACTION_TOKEN }} # -> remember add this in settings/secrets as https://ZanderZhao.github.io/gitbook-action/
# time_zone: Asia/Shanghai
# source_branch: master
source_branch: 6689-setup-gitbook-action
source_dir: "."
source_edit_time: true
publish_repo: Ocelot-Social-Community/docs.ocelot.social
publish_commit_message: ${{ github.event.head_commit.message }}
# publish_branch: master
publish_branch: gitbook-output
publish_dir: _book
# Some not indicated are default values, eg: publish_repo

# example2
# - name: Gitbook Action
# uses: ZanderZhao/gitbook-action@master
# with:
# token: ${{ secrets.PERSONAL_TOKEN }}
# time_zone: Asia/Shanghai
# source_repo: GitbookIO/gitbook
# source_branch: master
# source_dir: docs
# publish_branch: master
# publish_dir: docs/official
# publish2_repo: gitbook-org/gitbook
# Some not indicated are default values, eg: publish_repo
37 changes: 37 additions & 0 deletions book.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"title": "Ocelot.Social – Developer Documentation",
"author": "busFaktor() e.V.",
"description": "Developer Documentation by Gitbook-Action",
"gitbook": "3.2.3",
"plugins": [
"-lunr",
"-search",
"-sharing",
"hints",
"tabs2",
"insert-logo",
"theme-simple@git+https://github.com/plugins-zander/gitbook-plugin-theme-simple.git",
"search-pro@git+https://github.com/plugins-zander/gitbook-plugin-search-pro.git",
"splitter@git+https://github.com/plugins-zander/gitbook-plugin-splitter.git",
"edit-link@git+https://github.com/plugins-zander/gitbook-plugin-edit-link.git",
"gtag@git+https://github.com/plugins-zander/gitbook-plugin-gtag.git",
"chapter-fold@git+https://github.com/plugins-zander/gitbook-plugin-chapter-fold.git",
"copy-code-button@git+https://github.com/plugins-zander/gitbook-plugin-copy-code-button.git"
],
"pluginsConfig": {
"gtag": {
"token": ""
},
"insert-logo": {
"url": "/webapp/static/img/custom/logo-squared.svg",
"style": "background: none; display: block; margin-left: auto; margin-right: auto; width: 25%;"
},
"edit-link": {
"base": "https://github.com/Ocelot-Social-Community/Ocelot-Social/edit/master/",
"label": "EDIT"
},
"sitemap-general": {
"prefix": "https://zlogs.net/gitbook-action/"
}
}
}
1 change: 1 addition & 0 deletions docs/.gitkeep
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Gitbook Action will put the files for GitHub Pages in here
8 changes: 4 additions & 4 deletions edit-this-documentation.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ XXX

## Host The Screenshots

### Host On Ocelot-Social \(GitHub\) repository
Often we need screenshots to explain things.

{% hint style="info" %}
TODO: How to host on Ocelot-Social \(GitHub\) repository ...
{% endhint %}
### Host On Ocelot-Social GitHub repository

{% hint style="info" %} TODO: How to host on Ocelot-Social GitHub repository ... {% endhint %}

### Quick Solution

Expand Down