Skip to content

Instantly share code, notes, and snippets.

@mmiranda
Last active December 3, 2021 13:38
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mmiranda/49137bd630588110c81e1347cf394a18 to your computer and use it in GitHub Desktop.
Save mmiranda/49137bd630588110c81e1347cf394a18 to your computer and use it in GitHub Desktop.
Mirror Markdown to Confluence

Your markdown content

Check metadata info on RAW version

name: Sync Documentation
on:
push:
branches:
- main
env:
CONFLUENCE_BASE_URL: "https://yourteam.atlassian.net/wiki"
CONFLUENCE_USER: user@company.com
CONFLUENCE_API_TOKEN: ${{ secrets.CONFLUENCE_API_TOKEN }}
jobs:
sync-confluence-docs:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: satackey/action-docker-layer-caching@v0.0.11
continue-on-error: true
- name: Sync Markdown
run: docker run --rm --volume "$(pwd):/docs" kovetskiy/mark:latest mark -u ${{ env.CONFLUENCE_USER }} -p ${{ env.CONFLUENCE_API_TOKEN }} -b ${{ env.CONFLUENCE_BASE_URL }} -k -f "**/*.md"
@mmiranda
Copy link
Author

Developers are happy with documentation next to the code (repo)
Stakeholders are happy with documentation on Confluence

win-win situation

@mmiranda
Copy link
Author

The only requirement is to put metadata in your Markdown files

<!-- Space: YOUR_SPACE -->
<!-- Parent: Cloud Platform -->
<!-- Parent: Parent2 -->
<!-- Parent: Architecture Decision Records -->
<!-- Title: your title  -->

Check the lib documentation for more possibilities: https://github.com/kovetskiy/mark

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment