Skip to content

Commit 8ab4b73

Browse files
Add doc.holiday actions (#179)
1 parent 0f30433 commit 8ab4b73

File tree

15 files changed

+159610
-0
lines changed

15 files changed

+159610
-0
lines changed
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# yaml-language-server: $schema=https://json.schemastore.org/github-action.json
2+
3+
name: 'Detect Documentation Root'
4+
description: 'Detects the root directory containing documentation source and records it in .doc.holiday/config'
5+
6+
outputs:
7+
documentation-root:
8+
description: 'The detected documentation root directory (relative path from repo root)'
9+
value: ${{ steps.outputs.outputs.documentation-root }}
10+
detection-method:
11+
description: 'The method used to detect the root (explicit|common-path|config|density|repo-root|no-docs)'
12+
value: ${{ steps.outputs.outputs.detection-method }}
13+
candidates:
14+
description: 'Other candidate directories considered (comma-separated)'
15+
value: ${{ steps.outputs.outputs.candidates }}
16+
summary:
17+
description: 'Summary of the detection process'
18+
value: ${{ steps.outputs.outputs.summary }}
19+
config-updated:
20+
description: 'Whether the config file was updated (true|false)'
21+
value: ${{ steps.outputs.outputs.config-updated }}
22+
23+
runs:
24+
using: 'composite'
25+
steps:
26+
- name: Setup Node.js
27+
uses: actions/setup-node@v4
28+
with:
29+
node-version: '20'
30+
31+
- name: Run documentation root detection
32+
id: detection
33+
working-directory: ${{ github.action_path }}
34+
run: |
35+
node dist/index.cjs
36+
shell: bash
37+
env:
38+
GITHUB_WORKSPACE: ${{ github.workspace }}
39+
40+
- name: Set outputs
41+
id: outputs
42+
working-directory: ${{ github.workspace }}
43+
run: |
44+
if [ -f ".action-outputs-docs-root.json" ]; then
45+
# Use jq directly on the file to avoid shell expansion issues
46+
echo "documentation-root=$(jq -r '."documentation-root"' .action-outputs-docs-root.json)" >> $GITHUB_OUTPUT
47+
echo "detection-method=$(jq -r '."detection-method"' .action-outputs-docs-root.json)" >> $GITHUB_OUTPUT
48+
echo "candidates=$(jq -r '.candidates' .action-outputs-docs-root.json)" >> $GITHUB_OUTPUT
49+
echo "summary=$(jq -r '.summary' .action-outputs-docs-root.json)" >> $GITHUB_OUTPUT
50+
echo "config-updated=$(jq -r '."config-updated"' .action-outputs-docs-root.json)" >> $GITHUB_OUTPUT
51+
rm -f .action-outputs-docs-root.json
52+
else
53+
echo "::warning::No .action-outputs-docs-root.json file found"
54+
fi
55+
shell: bash
56+
57+
branding:
58+
icon: 'search'
59+
color: 'green'
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[ZoneTransfer]
2+
ZoneId=3
3+
ReferrerUrl=C:\Users\Maor\Downloads\github-actions-bundle.tar.gz.gz

0 commit comments

Comments
 (0)