Skip to content

I love typos

I love typos #33

Workflow file for this run

name: CI
on:
push:
branches-ignore: gh-pages
pull_request:
branches-ignore: gh-pages
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Create gh-pages directory
run: mkdir -p generation/gh-pages
- name: Install dependencies
run: sudo apt-get install m4 graphviz
- name: "Generate C++20 flowcharts"
run: |
set -eu -o pipefail
out='generation/gh-pages/std-2020'
mkdir -- "$out"
m4 cpp20/flowchart.dot.m4 | dot -Tsvg -start=1000 > "$out"/initialization.svg
m4 cpp20/flowchart.dot.m4 | dot -Tpng -start=1000 > "$out"/initialization.png
- name: "Generate C++23 flowcharts"
run: |
set -eu -o pipefail
out='generation/gh-pages/std-2023'
mkdir -- "$out"
cpp23/build.sh "$out"/initialization.svg "$out"/initialization.png
- name: Deploy generated flowcharts to Github Pages
if: github.ref == 'refs/heads/main'
run: |
# Set Git committer identity
git config user.name "ci-build"
git config user.email "[email protected]"
# Clear the index
EMPTY_TREE="$(git hash-object -t tree /dev/null)"
git read-tree -- "$EMPTY_TREE"
# Add site data to index
git add generation/gh-pages
git fetch origin gh-pages
ORIG_SITE_TREE="$(git rev-parse origin/gh-pages^{tree})"
NEW_SITE_TREE="$(git write-tree --prefix=generation/gh-pages)"
if [ "$ORIG_SITE_TREE" != "$NEW_SITE_TREE" ]; then
SITE_COMMIT="$(git commit-tree -p origin/gh-pages -m "CI updates" -- "$NEW_SITE_TREE")"
echo Updating GitHub pages site to commit "$SITE_COMMIT"
git push origin "$SITE_COMMIT":gh-pages
else
echo Not updating GitHub pages site
fi