forked from buzzert/smartbar
45 lines
1.4 KiB
YAML
45 lines
1.4 KiB
YAML
name: Build PDF
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, master ]
|
|
pull_request:
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
pdf:
|
|
name: make pdf
|
|
runs-on: ubuntu-latest
|
|
container:
|
|
image: golang:1.22-bookworm
|
|
steps:
|
|
- name: Install Node 20 and Git
|
|
run: |
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends curl ca-certificates gnupg
|
|
install -d -m 0755 /etc/apt/keyrings
|
|
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
|
|
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_20.x nodistro main" > /etc/apt/sources.list.d/nodesource.list
|
|
apt-get update
|
|
apt-get install -y --no-install-recommends nodejs git
|
|
rm -rf /var/lib/apt/lists/*
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Chromium and tools
|
|
run: |
|
|
apt-get update
|
|
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
|
make chromium ca-certificates fonts-liberation
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
- name: Build PDF
|
|
run: make pdf
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: output-pdf
|
|
path: _dist/output.pdf
|
|
if-no-files-found: error
|