You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This action allows to synchronize one or more markdown files to BookStack.
3
9
This makes it possible to maintain documentation within a repository while still
4
10
making it available in your central documentation solution.
5
11
6
12
This action features:
7
13
- Sync to either a chapter or a book
8
14
- Use either a single file or a glob pattern to sync multiple files
9
-
- Add tags to the generated pages
10
15
- Keep your pages up to date - the action can create and update pages
11
16
17
+
## Limitations
18
+
- To support globs and therefore the creation of multiple pages at once, this action uses the **first** headline of type **# (h1)** as the name for the pages
19
+
- Your markdown files **must** have at least one **#** to be accepted by the Action
20
+
- The sync is currently one way, so deleting files from the repo won't delete the pages from BookStack
21
+
- We always push an update to BookStack which generates additional traffic, however, BookStack won't create additional revisions if the content is unchanged
22
+
- You must grab the book/chapter id from the database or using the API to configure the action
23
+
12
24
## Inputs
13
25
14
-
### `bookstack-url`
26
+
### `url`
15
27
-**Required**
16
28
- The URL to your BookStack instance, where the files will be synced to.
17
29
18
-
### `bookstack-token-id`
30
+
### `token-id`
19
31
-**Required**
20
32
- The id of your BookStack API connection.
21
33
22
-
### `bookstack-token-secret`
34
+
### `token-secret`
23
35
-**Required**
24
36
- The secret of your BookStack API connection.
25
37
@@ -31,9 +43,6 @@ This action features:
31
43
-**Required, when `book-id` is not set**
32
44
- The ID of the book to sync to.
33
45
34
-
### `tags`
35
-
- The tags to add to the page, comma separated
36
-
37
46
### `path`
38
47
- The path to the markdown file(s) to sync, you can use glob patterns for multiple files
39
48
@@ -51,8 +60,70 @@ with:
51
60
# You only need one of book-id or chapter-id
52
61
book-id: 123
53
62
chapter-id: 123
54
-
tags: 'action,sync,bookstack'
55
63
# You can either use a path to a file or a glob pattern:
56
64
path: 'sub/directories/README.md'
57
65
path: 'sub/*/*.md'
58
-
```
66
+
```
67
+
68
+
## Development
69
+
To develop locally, you should install **NodeJS 20**.
70
+
71
+
The following commands can be used for local development:
72
+
```
73
+
# Install dependencies
74
+
$ npm install
75
+
76
+
# Format and bundle for distribution
77
+
$ npm run bundle
78
+
79
+
# Only check code style using prettier
80
+
$ npm run format:check
81
+
82
+
# Check code style and reformat
83
+
$ npm run format:write
84
+
```
85
+
86
+
Be sure to always run the bundler and commit the `dist/` directory when doing changes to the code.
87
+
88
+
## Contributing
89
+
90
+
If you want to take part in contribution, like fixing issues and contributing directly to the code base, please visit
91
+
the [How to Contribute][gh-contribute] document.
92
+
93
+
## Useful links
94
+
95
+
[License][gh-license] -
96
+
[Contributing][gh-contribute] -
97
+
[Code of conduct][gh-codeofconduct] -
98
+
[Issues][gh-issues] -
99
+
[Pull requests][gh-pulls]
100
+
101
+
<hr>
102
+
103
+
###### Copyright (c) [Lazy Bytez][gh-team]. All rights reserved | Licensed under the MIT license.
0 commit comments