Skip to content

👷 pdf generation

👷 pdf generation #5

Workflow file for this run

name: Build PDF and publish to commonhaus.github.io
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
jobs:
main-root:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main' && github.repository == 'commonhaus/foundation-draft'
steps:
- id: is-main-root
run: echo "This is the main branch of 'commonhaus/foundation-draft'"
lint:
name: Check markdown links
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '18.5'
cache: 'npm'
- name: Check markdown links
run: |
npm ci
npm run test
bump:
name: Update website
needs: [main-root, lint]
runs-on: ubuntu-latest
steps:
- name: Bump website
env:
GH_TOKEN: ${{ secrets.ACTIONS_PUBLISH_PAT }}
run: |
gh workflow run -R commonhaus/commonhaus.github.io gh-pages.yml
package:
name: Package PDFs
needs: lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: convert md to pdf
env:
GIT_COMMIT: ${{ github.sha }}
GH_TOKEN: ${{ github.token }}
IS_PR: ${{ github.event_name == 'pull_request' }}
run: ./.github/docker-build-pdf.sh
- uses: actions/upload-artifact@v3
with:
name: output
path: output/public