Skip to content

Added PPUC/DMD (#6) #32

Added PPUC/DMD (#6)

Added PPUC/DMD (#6) #32

Workflow file for this run

name: Deploy MkDocs to GitHub Pages
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Test GitHub API connectivity
id: test-api
run: |
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" \
-H "Accept: application/vnd.github.v3+json" \
"https://api.github.com/orgs/${{ github.repository_owner }}/repos")
if [ "$RESPONSE" -ne 200 ]; then
echo "::error::Failed to fetch repositories (HTTP $RESPONSE)"
exit 1
fi
echo "API connection successful"
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install MkDocs, Material and plugins
run: |
pip install -r requirements.txt
- name: Build documentation
run: mkdocs build --site-dir ./out
- name: Verify structure
run: |
ls -R ./out # Debug: Show built files
test -f ./out/index.html || exit 1
# grep -q "Failed to load repository data" ./out/github_repos/index.html && exit 2
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
with:
# Deletes all files in target repo except .git before deploying new files
keep_files: false
publish_dir: ./out
github_token: ${{ secrets.GITHUB_TOKEN }}
# Force orphan to ensure complete cleanup when needed
force_orphan: false # Set to true if you want complete clean slate (use carefully)