-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (37 loc) · 1.42 KB
/
generate-pdf.yml
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
name: Generate PDF and Upload as Artifact
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-and-upload-pdf:
runs-on: ubuntu-20.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Download and Install Pandoc
run: |
wget https://github.com/jgm/pandoc/releases/download/3.1.13/pandoc-3.1.13-1-amd64.deb
sudo dpkg -i pandoc-3.1.13-1-amd64.deb
- name: Install XeLaTeX
run: |
sudo apt-get update
sudo apt-get install -y texlive-xetex
- name: Setup Python and AWS CLI
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install AWS CLI
run: pip install awscli
- name: Generate PDF
run: pandoc --fail-if-warnings=false --defaults pdf.yml
- name: Configure AWS CLI for Cloudflare R2
run: |
aws configure set aws_access_key_id ${{ secrets.CLOUDFLARE_ACCESS_KEY_ID }}
aws configure set aws_secret_access_key ${{ secrets.CLOUDFLARE_SECRET_ACCESS_KEY }}
aws configure set default.region us-east-1
aws configure set default.s3.signature_version s3v4
- name: Upload PDF to Cloudflare R2
run: |
aws s3 cp appgini-documentation.pdf s3://bigprof-cdn/appgini-desktop/appgini-documentation.pdf --endpoint-url https://${{ secrets.CLOUDFLARE_ACCOUNT_ID }}.r2.cloudflarestorage.com