Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bhacaz/docs-as-code-confluence
Publish the content of a folder to confluence Github Action
https://github.com/bhacaz/docs-as-code-confluence
actions confluence docs-as-code
Last synced: 7 days ago
JSON representation
Publish the content of a folder to confluence Github Action
- Host: GitHub
- URL: https://github.com/bhacaz/docs-as-code-confluence
- Owner: Bhacaz
- License: mit
- Created: 2021-11-25T00:26:49.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-05-17T14:58:07.000Z (6 months ago)
- Last Synced: 2024-10-18T20:06:00.773Z (20 days ago)
- Topics: actions, confluence, docs-as-code
- Language: JavaScript
- Homepage:
- Size: 5.42 MB
- Stars: 38
- Watchers: 1
- Forks: 16
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Docs as Code - Confluence
Publish a folder of documentation to Confluence.
Create a Confluence Page for each markdown file. Each folder will create a _parent_ page to reflect
the directory structure.## Parameters
| Name | Description | Required |
|-----------------------| --- | --- |
| `folder` | The folder to sync | true |
| `username` | Confluence username or email | true |
| `password` | Confluence password or [API token](https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/) | true |
| `confluence-base-url` | Your Confluence URL (with `wiki`). Example: `https://mydomain.atlassian.net/wiki` | true |
| `space-key` | Confluence space key to publish the documentation. Located after `spaces` in the URL. `https://mydomain.atlassian.net/wiki/spaces/<<~1234>>`.
Or in _Space settings_ > _Space details_ > _Key_. | true |
| `parent-page-id` | Page id under which the documentation will be published. Located after `pages` in the URL. `https://mydomain.atlassian.net/wiki/spaces/~1234/pages/<<1234>>/My+Parent+Page` | true |## TODO
* Renaming a file
* Moving/Removing a file
* Not updating Confluence pages when there is no change
* Add commit link to the new page version
* Add markdown images with url source## Example of workflow
```yml
name: Sync Docs as Code - Confluence
on:
push:
branches:
- main
paths:
- 'docs/**'
jobs:
docs-as-code:
runs-on: ubuntu-latest
name: Sync Docs as Code - Confluence
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Sync Docs as Code - Confluence
uses: Bhacaz/docs-as-code-confluence@v3
with:
folder: docs
username: [email protected]
password: ${{ secrets.API_TOKEN }}
confluence-base-url: https://mydomain.atlassian.net/wiki
space-key: ~1234
parent-page-id: 123456789
```## Example of usage in a repository
[Bhacaz/docs-as-code-confluence-demo](https://github.com/Bhacaz/docs-as-code-confluence-demo)
## Development
**Test**
```bash
npm run test
```**Build**
```bash
npm run build
```