Skip to content

update aesthetics and readability #13

update aesthetics and readability

update aesthetics and readability #13

Workflow file for this run

name: Test and Publish Documentation
on:
push:
branches:
- feature/wiki-update
jobs:
docs-build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
pip install -r docs/requirements.txt
- name: Build Sphinx Documentation
run: |
cd docs
make html
shell: bash
- name: Convert .rst files to Markdown, including index.rst as Home.md
run: |
sudo apt-get install -y pandoc
mkdir -p converted_md
find . -name "*.rst" -exec sh -c 'if [ "$(basename {})" = "index.rst" ]; then pandoc -f rst -t markdown -o converted_md/Home.md "{}"; else pandoc -f rst -t markdown -o converted_md/"$(basename {} .rst).md" "{}"; fi' \;
shell: bash
- name: Push Documentation to Wiki
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
# Setup git
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
git config --global user.name "${{ github.actor }}"
# Clone wiki repo using authenticated URL with environment variable
git clone https://x-access-token:${GITHUB_TOKEN}@github.com/${{ github.repository }}.wiki.git wiki
# Synchronize all Markdown files to the wiki, ensuring everything is copied
rsync -av converted_md/ wiki/
cd wiki
# Check for changes; if none, exit
if [ -z "$(git status --porcelain)" ]; then
echo "No changes to the wiki."
exit 0
fi
# Add, commit, and push changes
git add .
git commit -m "Update Wiki documentation by ${{ github.actor }}"
git push
shell: bash