This Action copies the contents of a Markdown .md
file or folder to a Confluence cloud parent page.
It uses the heading in the first line that begins with a single #
as the Confluence page title otherwise,
it takes the filename of the .md
file as the page title.
push:
branches:
- develop
paths:
- 'docs/**'
jobs:
dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: axro-gmbh/markdown-to-confluence-sync@1.4
with:
input_directory: docs
exclude_files: this.md,that.md
cloud: company
space_key: ${{ secrets.CONFLUENCE_SPACE_KEY }}
parent_page_id: ${{ secrets.JIRA_SCRIPTS_PARENT_PAGE_ID }}
user: ${{ secrets.JIRA_USER }}
token: ${{ secrets.JIRA_TOKEN }}
Uses a token for the REST API v2.
-
input_directory
: The directory or directories (comma seperated) you want to sync -
input_file
: If you don't want to sync a folder, you can also sync a single markdown file
WARNING! USE ONLY ONE OF THE VARIABLES! (but one of them is required)
-
cloud
: The ID can be found by looking at your confluence domain -
space_key
: The space key of the page -
parent_page_id
: The parent page ID of the page you want to create a child page under -
user
: The user that generated the access token -
token
: The Confluence API token
Optional:
-
exclude_files
: If there are files in the folder you would want to exclude -
full_width
: If set totrue
, it will create the confluence page with full width
You can find the data in the URL of the page you want to sync to:
https://<cloud>.atlassian.net/wiki/spaces/<space_key>/pages/<parent_page_id>/...
Create your api token in your Atlassian account settings: https://id.atlassian.com/manage-profile/security/api-tokens