Skip to content

📝 Clarify decision-making rules [due Oct 20] #530

📝 Clarify decision-making rules [due Oct 20]

📝 Clarify decision-making rules [due Oct 20] #530

Workflow file for this run

name: Build PDF and publish to commonhaus.github.io
on:
pull_request:
paths:
- 'bylaws/**'
- 'policies/**'
push:
paths:
- 'agreements/**'
- 'bylaws/**'
- 'policies/**'
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
permissions:
contents: read
jobs:
update-website:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'commonhaus/foundation' }}
permissions:
actions: read
steps:
- name: Bump website
env:
GH_TOKEN: ${{ secrets.ACTIONS_PUBLISH_PAT }}
run: |
gh workflow run -R commonhaus/commonhaus.github.io push-content.yml
package:
name: Package PDFs
runs-on: ubuntu-latest
permissions:
contents: write
actions: write
steps:
- name: Checkout
uses: actions/checkout@v4
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
with:
name: pdf-output
path: output/public/*.pdf
- name: Update snapshot tag
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'commonhaus/foundation' }}
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 view SNAPSHOT
gh release edit SNAPSHOT --draft=false