This repository contains a script that allows you to publish Markdown files from GitHub to Confluence. The script automates the process of converting Markdown files to Confluence markup and uploading them to your Confluence space.
Link to my article: https://dev.to/andygolubev/automate-publishing-markdown-files-from-github-to-confluence-with-github-to-confluence-publisher-tool-eh4
Create new cloud domain here https://my.atlassian.com/product
You should create a Space and copy it's name from the URL (in my case: "Documentat". The full url is https://test-publisher.atlassian.net/wiki/spaces/Documentat/) Create a new page and copy it's id. (in my case: "262359". the full url is https://test-publisher.atlassian.net/wiki/spaces/Documentat/pages/262359/Documentation+from+the+github)
Create new API key here https://id.atlassian.com/manage-profile/security/api-tokens
Replace this values with your values
confluence_url: https://test-publisher.atlassian.net/wiki/rest/api/
confluence_space: Documentat
counfluence_parent_page_id: 262359
confluence_search_pattern: (this page is autogenerated)
github_folder_with_md_files: ./data
github_folder_with_image_files: ./data_images
I use "confluence_search_pattern:" to find autogenerated pages and delete it each run. I recommend to use some random value like "(this page is autogenerated FGWSDF)"
Create you secrets and setup your pipeline. Confluence expect you e-mail as a login and a API Key as a password.
Your confluence space is empty.
Then you run the publisher and it search for the pages with "confluence_search_pattern" from the config. Then it deletes all the found pages.
Then you can see that you parent page containes child pages with your content
All the images were poster as attachements for the pages.
The pages that imitates the folder contains the "Children Display" widget.