-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
69 lines (64 loc) · 2 KB
/
Copy pathaction.yml
File metadata and controls
69 lines (64 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: "Gitfluence Sync"
description: "Sync markdown files from a git repository to Confluence as a page hierarchy"
author: "gitfluence"
branding:
icon: "upload-cloud"
color: "blue"
inputs:
repo_path:
description: "Root directory of the git working tree to sync"
required: false
default: "."
dry_run:
description: "Preview mode — no Confluence API calls"
required: false
default: "false"
python_version:
description: "Python version to use"
required: false
default: "3.12"
extra_args:
description: "Additional CLI arguments passed to gitfluence (e.g. '--skip-empty --beautify-folders')"
required: false
default: ""
confluence_host:
description: "Confluence host URL"
required: true
confluence_token:
description: "Confluence API token"
required: true
confluence_int_host:
description: "Confluence integration host URL"
required: false
default: ""
confluence_int_token:
description: "Confluence integration API token"
required: false
default: ""
confluence_space:
description: "Confluence space key"
required: true
runs:
using: "composite"
steps:
- name: Set up Python ${{ inputs.python_version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ inputs.python_version }}
- name: Install gitfluence
shell: bash
run: pip install "${{ github.action_path }}"
- name: Sync to Confluence
shell: bash
env:
CONFLUENCE_HOST: ${{ inputs.confluence_host }}
CONFLUENCE_TOKEN: ${{ inputs.confluence_token }}
CONFLUENCE_INT_HOST: ${{ inputs.confluence_int_host }}
CONFLUENCE_INT_TOKEN: ${{ inputs.confluence_int_token }}
CONFLUENCE_SPACE: ${{ inputs.confluence_space }}
run: |
DRY_RUN_FLAG=""
if [ "${{ inputs.dry_run }}" = "true" ]; then
DRY_RUN_FLAG="--dry-run"
fi
gitfluence $DRY_RUN_FLAG ${{ inputs.extra_args }} ${{ inputs.repo_path }}