Skip to content

Instantly share code, notes, and snippets.

@mmiranda
Last active December 3, 2021 13:38
Show Gist options
  • 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: [email protected]
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/[email protected]
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