Single-HTML-Page Documentation Generation #52
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Single-HTML-Page Documentation Generation | |
on: | |
schedule: | |
- cron: "0 10 * * 1-5" # Runs at 10:00 UTC on Mon, Tue, Wed, Thu and Fri. (see https://crontab.guru) | |
workflow_dispatch: # Run on manual trigger | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: |- | |
python -m pip install --upgrade pip | |
pip install beautifulsoup4==4.12.2 | |
pip install wand==0.6.11 | |
pip install pdfkit==1.0.0 | |
pip install pillow==9.2.0 | |
pip install lxml==4.9.1 | |
sudo apt-get install wkhtmltopdf | |
sudo apt-get install libmagickwand-dev | |
- name: Run Single-HTML-Page Documentation Generator | |
run: python code-generators/SinglePageDocGenerator.py | |
- name: Push to Branch | |
run: |- | |
if [[ $(git diff | wc -m) == 0 ]]; then | |
exit 0 | |
fi | |
BRANCH=github-action-single-page-doc-generator | |
git config user.name GitHub Actions | |
git config user.email [email protected] | |
git checkout -b $BRANCH | |
git add . | |
git commit -m "Code generated by SinglePageDocGenerator.py" | |
git push --set-upstream origin $BRANCH -f |