Skip to content

docs: unify documentation workflows with improved validation #17522

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d0fe1f8
Add simplified docs preview GitHub action
EdwardAngert Apr 9, 2025
3010c77
Merge branch 'main' into simplified-docs-preview
EdwardAngert Apr 9, 2025
afbdde9
\Fix tj-actions/changed-files SHA to match existing usage\n\nUpdate t…
EdwardAngert Apr 9, 2025
1f716c9
\Fix docs preview workflow to ensure PR comments are posted\n\nUpdate…
EdwardAngert Apr 9, 2025
38cfd56
\Update preview URL format and add direct doc links\
EdwardAngert Apr 9, 2025
e072e92
Add shared docs GitHub action
EdwardAngert Apr 9, 2025
07e93b0
test: Add heading to docs README
EdwardAngert Apr 9, 2025
6a7a2bc
Add test workflow
EdwardAngert Apr 9, 2025
4fcb322
Unified documentation workflow
EdwardAngert Apr 23, 2025
777bddc
Enhance documentation workflows with cross-reference checking
EdwardAngert Apr 23, 2025
992c592
Enhance PR comment with informative status overview and collapsible s…
EdwardAngert Apr 23, 2025
6420b3f
Optimize workflow logic and improve Vale style checking
EdwardAngert Apr 23, 2025
0a464f3
enhance: optimize workflow with unified reporting and concurrency
EdwardAngert Apr 23, 2025
3840432
refactor: replace linkspector with lychee for link checking
EdwardAngert Apr 23, 2025
b555621
refactor: combine documentation workflow optimizations
EdwardAngert Apr 23, 2025
00a4fb0
fix: address workflow issues for GitHub Actions compatibility
EdwardAngert Apr 23, 2025
ba403f2
docs: update GitHub Actions documentation
EdwardAngert Apr 23, 2025
168b54b
Merge branch 'main' into feature/unified-docs-workflow-combined
EdwardAngert Apr 23, 2025
6a0c1c1
fix: remove duplicate docs example workflows and fix caching issues
EdwardAngert Apr 23, 2025
8a29450
fix: update lychee-action configuration for v1 compatibility
EdwardAngert Apr 23, 2025
e37cda8
fix readme
EdwardAngert Apr 23, 2025
749d142
fix: correct YAML syntax in docs-link-check.yaml
EdwardAngert Apr 23, 2025
90a9ca8
chore: use caret versioning for tj-actions/changed-files
EdwardAngert Apr 23, 2025
bb9e393
fix: update actions and preview URL handling
EdwardAngert Apr 23, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
fix: update actions and preview URL handling
- Update tj-actions/changed-files to use v45 tag instead of caret versioning
- Fix preview URLs for branches with slashes by replacing with dashes
- Ensure consistent branch name handling across docs-shared and docs-preview actions

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
  • Loading branch information
EdwardAngert and Claude committed Apr 23, 2025
commit bb9e3934b1b5772b61b168ac4d4f8cf4b9a4626e
4 changes: 3 additions & 1 deletion .github/actions/docs-preview/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ runs:
clean_path=$(echo "$clean_path" | tr -cd 'a-zA-Z0-9_./-')

# Get branch name for URLs
BRANCH_NAME=$(jq --raw-output .pull_request.head.ref "$GITHUB_EVENT_PATH")
RAW_BRANCH_NAME=$(jq --raw-output .pull_request.head.ref "$GITHUB_EVENT_PATH")
# Replace slashes with dashes for the URL
BRANCH_NAME=$(echo "$RAW_BRANCH_NAME" | sed 's|/|-|g' | sed 's|[^a-zA-Z0-9_-]|-|g')

# Generate preview URL with correct format
url_path=$(echo "$clean_path" | sed 's/\.md$//')
Expand Down
6 changes: 4 additions & 2 deletions .github/actions/docs-shared/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ runs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@^45
uses: tj-actions/changed-files@v45
with:
files: |
${{ inputs.docs-dir }}/**
Expand Down Expand Up @@ -592,7 +592,9 @@ runs:
shell: bash
run: |
# Robust branch name extraction with fallbacks for CI environments
BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" | sed 's/[^a-zA-Z0-9_-]/-/g')
RAW_BRANCH=$(git rev-parse --abbrev-ref HEAD 2>/dev/null || echo "${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}")
# Replace slashes with dashes for the URL
BRANCH=$(echo "$RAW_BRANCH" | sed 's|/|-|g' | sed 's|[^a-zA-Z0-9_-]|-|g')
# Store branch for other steps
echo "BRANCH=$BRANCH" >> $GITHUB_ENV
echo "url=https://coder.com/docs/@$BRANCH" >> $GITHUB_OUTPUT
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ jobs:
- name: Setup Node
uses: ./.github/actions/setup-node

- uses: tj-actions/changed-files@^45
- uses: tj-actions/changed-files@v45
id: changed-files
with:
files: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/docs-preview.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:

- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@^45
uses: tj-actions/changed-files@v45
with:
files: |
docs/**
Expand Down
Loading