Skip to content

Fix dead link and typos and add .idea to .gitignore #52

Fix dead link and typos and add .idea to .gitignore

Fix dead link and typos and add .idea to .gitignore #52

Workflow file for this run

name: Build PDF and publish to commonhaus.github.io
on:
pull_request:
push:
branches:
- main
workflow_dispatch:
env:
GH_BOT_EMAIL: "41898282+github-actions[bot]@users.noreply.github.com"
GH_BOT_NAME: "GitHub Action"
PANDOCK: ebullient/pandoc-emoji:3.1
jobs:
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: lint
if: ${{ github.ref == 'refs/heads/main' && github.repository == 'commonhaus/foundation-draft' }}
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
- run: mkdir -p ~/image-cache
- id: image-cache
uses: actions/[email protected]
with:
path: ~/image-cache
key: image-cache-${{ runner.os }}
- if: steps.image-cache.outputs.cache-hit != 'true'
run: |
docker pull ${PANDOCK}
docker save -o ~/image-cache/pandock.tar alpine
- if: steps.image-cache.outputs.cache-hit == 'true'
run: docker load -i ~/image-cache/pandock.tar
- 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@v4
if: ${{ github.ref != 'refs/heads/main' }}
with:
name: pdf-output
path: output/public/*.pdf
- name: Update snapshot tag
if: ${{ github.ref == 'refs/heads/main' && github.repository == 'commonhaus/foundation-draft' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
git config user.name ${{ env.GH_BOT_NAME }}
git config user.email ${{ env.GH_BOT_EMAIL }}
echo "Update tag for SNAPSHOT"
git push origin :refs/tags/SNAPSHOT
git tag -f SNAPSHOT
git push --tags
echo "Update SNAPSHOT release"
gh release upload SNAPSHOT --clobber output/public/*
# These must be done separately to correctly toggle draft flag
gh release edit SNAPSHOT -t "PDF snapshot" --prerelease
gh release edit SNAPSHOT --draft=false
gh release view SNAPSHOT