Giter VIP home page Giter VIP logo

github-to-confluence-publisher's Introduction

GitHub to Confluence Publisher

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

Setup

Create new domain in Confluence cloud

Create new cloud domain here https://my.atlassian.com/product

Create new Space, a Parent page and API Token

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

Configure the publisher in publisher/config/config.yaml

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)"

Setup a pipeline (example is provided in the github workflows folder)

Create you secrets and setup your pipeline. Confluence expect you e-mail as a login and a API Key as a password.

How it works

Your confluence space is empty.

space

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.

local run local run or github actions github

Then you can see that you parent page containes child pages with your content

structure

All the images were poster as attachements for the pages.

attachements

The pages that imitates the folder contains the "Children Display" widget.

widget

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.