mirror of
https://github.com/dwmkerr/hacker-laws.git
synced 2025-12-18 13:14:55 +01:00
54 lines
1.5 KiB
YAML
54 lines
1.5 KiB
YAML
name: "Validate Pull Request"
|
|
on:
|
|
pull_request:
|
|
|
|
jobs:
|
|
test-website-build:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Test Website Build
|
|
run: |
|
|
cd .github/website
|
|
make install
|
|
make build
|
|
cp -r build/. '../pages'
|
|
ls -al "../pages"
|
|
|
|
prepare-pdf:
|
|
runs-on: ubuntu-24.04
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
# Set a descriptive version. For PRs it'll be the short sha.
|
|
- name: Set Version
|
|
id: set_version
|
|
run: echo ::set-output name=VERSION::$(git rev-parse --short HEAD)
|
|
|
|
# Prepare the content files.
|
|
- name: Prepare Content
|
|
run: ./scripts/prepare-markdown-for-ebook.sh ${{ steps.set_version.outputs.VERSION }}
|
|
|
|
# Create a PDF from the prepared markdown.
|
|
- name: Prepare PDF
|
|
uses: docker://pandoc/latex:2.9
|
|
with:
|
|
args: "-V toc-title:\"Table Of Contents\" --toc --pdf-engine=pdflatex --standalone --output hacker-laws.pdf hacker-laws.md"
|
|
|
|
# Publish the PDF and intermediate markdown as an artifact.
|
|
- name: Publish PDF Artifact
|
|
uses: actions/upload-artifact@master
|
|
with:
|
|
name: hacker-laws.pdf
|
|
path: hacker-laws.pdf
|
|
|
|
- name: Publish Intermediate Markdown Artifact
|
|
uses: actions/upload-artifact@master
|
|
with:
|
|
name: hacker-laws.md
|
|
path: hacker-laws.md
|
|
|