-
Notifications
You must be signed in to change notification settings - Fork 191
60 lines (50 loc) · 2.41 KB
/
Copy pathhtml_generation.yml
File metadata and controls
60 lines (50 loc) · 2.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Single-HTML-Page Documentation Generation
on:
schedule:
- cron: "0 10 * * 2-5" # Runs at 10:00 UTC on Tue, Wed, Thu, and Fri (see https://crontab.guru)
- cron: "0 0 * * 1" # Runs at 00:00 UTC on Monday (also creates PR).
workflow_dispatch: # Run on manual trigger
jobs:
generate-html:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v5
- name: Free space
run: df -h && rm -rf /opt/hostedtoolcache* && df -h
- name: Install dependencies (apt-get)
run: |-
sudo apt-get update
wget https://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
sudo apt install -y build-essential xorg libssl-dev libxrender-dev wget
wget "https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6-1/wkhtmltox_0.12.6-1.bionic_amd64.deb"
sudo apt install -y ./wkhtmltox_0.12.6-1.bionic_amd64.deb
- name: Install dependencies (pip)
run: |-
python -m pip install --upgrade pip
pip install beautifulsoup4==4.14.3
pip install lxml==6.0.2
pip install pillow==11.1.0
pip install pdfkit==1.0.0
pip install wand==0.6.11
- name: Run Single-HTML-Page Documentation Generator
run: python code-generators/SinglePageDocGenerator.py
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
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 }} --recursive --acl bucket-owner-full-control --exclude "*" --include "*.pdf" --content-type "application/pdf"
- name: Create Pull Request
if: github.event_name == 'workflow_dispatch' || github.event.schedule == '0 0 * * 1'
uses: peter-evans/create-pull-request@v8
with:
branch: github-action-single-page-doc-generator
add-paths: single-page/*.html
title: "Update single-page HTML documentation"
body: "Automated changes from SinglePageDocGenerator.py."
committer: "GitHub Actions <github-actions@github.com>"
author: "GitHub Actions <github-actions@github.com>"