Skip to content

Single-HTML-Page Documentation Generation #102

Single-HTML-Page Documentation Generation

Single-HTML-Page Documentation Generation #102

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: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET }}
aws-region: us-west-1
- name: Copy files to the S3 website content bucket
run: |-
aws s3 cp ./single-page s3://${{ secrets.AWS_BUCKET }} --acl bucket-owner-full-control --exclude "*" --include "*.html" --content-type "text/html"
aws s3 cp ./single-page s3://${{ secrets.AWS_BUCKET }} --acl bucket-owner-full-control --exclude "*" --include "*.pdf" --content-type "application/pdf"
# - 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