@@ -30,78 +30,22 @@ jobs:
3030 uses : actions/setup-python@v4
3131 with :
3232 python-version : " 3.10"
33- cache : ' pip'
3433
35- - name : Install dependencies
34+ - name : Install MkDocs and theme
3635 run : |
37- python -m pip install --upgrade pip
38- pip install mkdocs-material mkdocs-material-extensions pymdown-extensions
39-
40- - name : Create default mkdocs config
41- run : |
42- if [ ! -f "mkdocs.yml" ]; then
43- echo "Creating default mkdocs.yml"
44- cat > mkdocs.yml << EOF
45- site_name: Amega AI
46- theme:
47- name: material
48- features:
49- - navigation.tabs
50- - navigation.sections
51- - navigation.top
52- - search.highlight
53- markdown_extensions:
54- - pymdownx.highlight:
55- anchor_linenums: true
56- - pymdownx.inlinehilite
57- - pymdownx.snippets
58- - pymdownx.superfences
59- nav:
60- - Home: index.md
61- - About: about.md
62- EOF
63- fi
64-
65- - name : Ensure docs structure
66- run : |
67- mkdir -p docs
68- if [ ! -f "docs/index.md" ]; then
69- echo "# Welcome to Amega AI" > docs/index.md
70- echo "Documentation is under construction." >> docs/index.md
71- fi
72- if [ ! -f "docs/about.md" ]; then
73- echo "# About Amega AI" > docs/about.md
74- echo "More information coming soon." >> docs/about.md
75- fi
36+ pip install mkdocs-material==9.6.14 \
37+ mkdocs-material-extensions==1.3.1 \
38+ pymdown-extensions==10.15
7639
7740 - name : Build documentation
78- run : mkdocs build
41+ run : mkdocs build --strict
7942
8043 - name : Deploy to GitHub Pages
8144 if : github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
45+ env :
46+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
8247 run : |
8348 git config --global user.name "github-actions[bot]"
8449 git config --global user.email "github-actions[bot]@users.noreply.github.com"
85- mkdocs gh-deploy --force
86-
87- - name : Generate build report
88- if : always()
89- run : |
90- echo "## Documentation Build Report" > docs-report.md
91- echo "### Status" >> docs-report.md
92- echo "- Config: $([ -f mkdocs.yml ] && echo 'FOUND' || echo 'CREATED')" >> docs-report.md
93- echo "- Build: ${{ job.status }}" >> docs-report.md
94- echo "### Files" >> docs-report.md
95- echo "\`\`\`" >> docs-report.md
96- ls -R site/ >> docs-report.md || echo "No site directory found" >> docs-report.md
97- echo "\`\`\`" >> docs-report.md
98-
99- - name : Upload documentation
100- if : always()
101- uses : actions/upload-artifact@v4
102- with :
103- name : documentation
104- path : |
105- site/
106- docs-report.md
107- retention-days : 5
50+ git remote set-url origin https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}
51+ mkdocs gh-deploy --force
0 commit comments