This Github Action serves the purpose of copying the contents of a Markdown .md
file to a Confluence Cloud Page.
# .github/workflows/my-workflow.yml
on: [push]
jobs:
dev:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: confluence-markdown-sync
with:
from: './README.md'
to: '123456' # The confluence page id where to write the output
cloud: <my-confluence-cloud-id>
user: <[email protected]>
token: <my-token>
Uses basic auth for the rest api.
-
cloud
: The ID can be found by looking at yout confluence domain:https://xxx.atlassian.net/...
-
user
: The user that generated the access token -
to
: The page ID can be found by simply navigating to the page where you want the content to be postet to and looke at the url. It will look something like this:https://<cloud-id>.atlassian.net/wiki/spaces/<space>/pages/<page-id>/<title>
It's higly reccomended that you use secrets!
To use them you need them to specify them before in your repo. Docs
The you can use them in any input field.
# .github/workflows/my-workflow.yml
# ...
token: ${{ secrets.token }}
- Clone the repo
- Install act
- Create the same config in the repo folder as in the getting started section above.
- Change
uses: confluence-markdown-sync
->uses: ./
- Create an example markdown file
Some.md
and set it in the configfrom: './Some.md'
- Run locally
act -b
You can simply create a .secrets
file and specify it to act
token=abc123
# .github/workflows/dev.yml
# ...
token: ${{ secrets.token }}
act -b --secret-file .secrets