Skip to content

Commit 18cded8

Browse files
committed
ci: Enhance GitHub Actions workflow for documentation deployment
- Add token to checkout action for proper permissions - Add link checking step to verify documentation integrity - Improve Node.js cache configuration - Add deployment verification step with URL information - Add descriptive step names for better workflow visibility - Add link checking with non-blocking behavior Signed-off-by: Aaron Lippold <[email protected]>
1 parent 9753c7f commit 18cded8

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

.github/workflows/deploy-docs.yml

+21-6
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ jobs:
1616
deploy:
1717
runs-on: ubuntu-latest
1818
steps:
19-
- uses: actions/checkout@v4
19+
- name: Checkout repository
20+
uses: actions/checkout@v4
2021
with:
2122
fetch-depth: 0
23+
token: ${{ secrets.GITHUB_TOKEN }}
2224

2325
# Set up Python and cache dependencies
2426
- name: Set up Python
@@ -39,7 +41,7 @@ jobs:
3941
uses: actions/setup-node@v3
4042
with:
4143
node-version: 18
42-
cache: npm
44+
cache: 'npm'
4345
cache-dependency-path: docs/package-lock.json
4446

4547
# Install Node.js dependencies
@@ -52,13 +54,26 @@ jobs:
5254
working-directory: ./docs
5355
run: npm run lint || echo "Lint check skipped, continuing deployment"
5456

57+
# Check for broken links or references (but don't fail the build)
58+
- name: Check for broken links
59+
run: |
60+
cd docs
61+
npm run links || echo "Link check found issues, review logs for details"
62+
continue-on-error: true
63+
5564
# Build and validate documentation
5665
- name: Build documentation with validation
5766
run: mkdocs build --strict
58-
59-
# Deploy to GitHub Pages
60-
- name: Deploy documentation
67+
68+
# Deploy to GitHub Pages using mkdocs
69+
- name: Deploy to GitHub Pages
6170
run: |
6271
git config --local user.email "github-actions[bot]@users.noreply.github.com"
6372
git config --local user.name "github-actions[bot]"
64-
mkdocs gh-deploy --force
73+
mkdocs gh-deploy --force
74+
75+
# Verify deployment
76+
- name: Verify deployment
77+
run: |
78+
echo "Documentation deployed to GitHub Pages"
79+
echo "Visit https://mitre.github.io/kube-cinc-secure-scanner/ to view the documentation"

0 commit comments

Comments
 (0)