Skip to content

Github Action to render markdown to confluence pages

License

Notifications You must be signed in to change notification settings

mbovo/mark2confluence

Repository files navigation

mark2confluence

GitHub Action for converting markdown files into Confluence pages

This Action uses mark to accomplish this task

Inputs

Required

action - [publish, dry-run, verify]

  • verify - Verify only the conversion from markdown to html
  • dry-run - Verify in dry-run the conversion will success (connecting to confluence)
  • publish - Use the given confluence account and push the generated pages

Required Environment variables

BASE_URL: https://your.confluence.url # Confluence base url of your instance
DOC_DIR: docs # Docs directory based on the git repo root
CONFLUENCE_USERNAME: ${{ secrets.CONFLUENCE_USERNAME }} # CONFLUENCE_USERNAME (Confluence username) must be set in GitHub Repo secrets
CONFLUENCE_PASSWORD: ${{ secrets.CONFLUENCE_PASSWORD }} # CONFLUENCE_PASSWORD (Confluence api key) must be set in GitHub Repo secrets

Example workflow

name: Docs Test and Publish

on: pull_request

jobs:
  helm-suite:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2

    # - name: myOtherJob1
    #   run:

    - name: Test Docs generation
      uses: draios/infra-ghaction-mark2confluence@main
      with:
        action: "test"
      env:
        BASE_URL: https://your.confluence.url
        CONFLUENCE_USERNAME: ${{ secrets.CONFLUENCE_USERNAME }}
        CONFLUENCE_PASSWORD: ${{ secrets.CONFLUENCE_PASSWORD }}

    - name: Publish Docs
      uses: draios/infra-ghaction-mark2confluence@main
      with:
        action: "publish"
      env:
        BASE_URL: https://your.confluence.url
        CONFLUENCE_USERNAME: ${{ secrets.CONFLUENCE_USERNAME }}
        CONFLUENCE_PASSWORD: ${{ secrets.CONFLUENCE_PASSWORD }}

About

Github Action to render markdown to confluence pages

Resources

License

Stars

Watchers

Forks

Packages

No packages published