Browse Source

Merge pull request #561 from codesmythe/test02

Add flow to generate documentation page via MkDocs and GitHub Pages
pull/562/head
Wayne Warthen 8 months ago
committed by GitHub
parent
commit
81278afefe
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 12
      .github/workflows/commit.yml
  2. 17
      Source/Doc/Makefile
  3. 16
      Source/Doc/mkdocs.yml

12
.github/workflows/commit.yml

@ -25,9 +25,12 @@ jobs:
- name: Build - name: Build
run: | run: |
export TZ='America/Los_Angeles' export TZ='America/Los_Angeles'
sudo apt-get install srecord
sudo apt-get install srecord gpp pandoc
pip install mkdocs
make distlog make distlog
rm -rf .git* rm -rf .git*
make -C Source/Doc deploy_mkdocs
mkdocs build -f Source/Doc/mkdocs.yml
- name: List Output - name: List Output
run: | run: |
@ -35,6 +38,13 @@ jobs:
ls -l ls -l
find -type f -exec md5sum '{}' \; find -type f -exec md5sum '{}' \;
- name: Deploy Docs
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/master'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: Source/Doc/site
- name: Upload Artifact - name: Upload Artifact
uses: actions/upload-artifact@v4.3.0 uses: actions/upload-artifact@v4.3.0
with: with:

17
Source/Doc/Makefile

@ -31,12 +31,12 @@ all :: deploy
pandoc $< -f markdown -t dokuwiki -s -o $@ --default-image-extension=pdf pandoc $< -f markdown -t dokuwiki -s -o $@ --default-image-extension=pdf
%.gfm : %.tmp %.gfm : %.tmp
pandoc $< -f markdown -t gfm-yaml_metadata_block -s -o $@ --default-image-extension=pdf
pandoc $< -f markdown -t gfm-yaml_metadata_block -s -o $@ --default-image-extension=svg
%.txt : %.tmp %.txt : %.tmp
pandoc $< -f markdown -t plain -s -o $@ --default-image-extension=pdf pandoc $< -f markdown -t plain -s -o $@ --default-image-extension=pdf
deploy :
deploy : deploy_mkdocs
cp Introduction.gfm "../../ReadMe.md" cp Introduction.gfm "../../ReadMe.md"
cp Introduction.txt "../../ReadMe.txt" cp Introduction.txt "../../ReadMe.txt"
cp Introduction.pdf "../../Doc/RomWBW Introduction.pdf" cp Introduction.pdf "../../Doc/RomWBW Introduction.pdf"
@ -45,3 +45,16 @@ deploy :
cp Applications.pdf "../../Doc/RomWBW Applications.pdf" cp Applications.pdf "../../Doc/RomWBW Applications.pdf"
cp Catalog.pdf "../../Doc/RomWBW Disk Catalog.pdf" cp Catalog.pdf "../../Doc/RomWBW Disk Catalog.pdf"
cp Hardware.pdf "../../Doc/RomWBW Hardware.pdf" cp Hardware.pdf "../../Doc/RomWBW Hardware.pdf"
deploy_mkdocs : Introduction.gfm UserGuide.gfm SystemGuide.gfm Applications.gfm Catalog.gfm Hardware.gfm
rm -rf mkdocs
mkdir -p mkdocs/UserGuide/Graphics mkdocs/SystemGuide/Graphics
cp Introduction.gfm mkdocs/Introduction.md
cp UserGuide.gfm mkdocs/UserGuide.md
cp SystemGuide.gfm mkdocs/SystemGuide.md
cp Applications.gfm mkdocs/Applications.md
cp Catalog.gfm mkdocs/Catalog.md
cp Hardware.gfm mkdocs/Hardware.md
cp ReadMe.md mkdocs/README.md
cp Graphics/*.svg mkdocs/UserGuide/Graphics
cp Graphics/*.svg mkdocs/SystemGuide/Graphics

16
Source/Doc/mkdocs.yml

@ -0,0 +1,16 @@
site_name: RomWBW Documentation V3.6
repo_url: https://github.com/wwarthen/RomWBW
edit_uri: ""
docs_dir: mkdocs
nav:
- Introduction: Introduction.md
- User Guide: UserGuide.md
- System Guide: SystemGuide.md
- Applications: Applications.md
- Catalog: Catalog.md
- Hardware: Hardware.md
theme:
name: mkdocs
color_mode: auto
user_color_mode_toggle: true
navigation_depth: 3
Loading…
Cancel
Save