Skip to content

Commit

Permalink
Fixes HTML Generator GitHub Action
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexCatarino committed Nov 28, 2023
1 parent c52a2e9 commit e6724d3
Showing 1 changed file with 15 additions and 8 deletions.
23 changes: 15 additions & 8 deletions .github/workflows/html_generation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,21 +7,28 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Install dependencies
- name: Free space
run: df -h && rm -rf /opt/hostedtoolcache* && df -h

- name: Install dependencies (apt-get)
run: |-
sudo apt-get update
sudo apt-get install -y libmagickwand-dev wkhtmltopdf
- name: Install dependencies (pip)
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
Expand All @@ -34,15 +41,15 @@ jobs:
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"
run: aws s3 cp ./single-page s3://${{ secrets.AWS_BUCKET }} --recursive --acl bucket-owner-full-control --exclude "*" --include "*.pdf" --content-type "application/pdf"

- name: Push to Branch
timeout-minutes: 30
run: |-
BRANCH=github-action-single-page-doc-generator
git config user.name GitHub Actions
git config user.email [email protected]
git config http.postBuffer 524288000
git checkout -b $BRANCH
git add single-page/*.pdf
git commit -m "Code generated by SinglePageDocGenerator.py"
Expand Down

0 comments on commit e6724d3

Please sign in to comment.