Tangle project.mk
too
#12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Weave+publish, & tangle onto `master` | |
on: | |
push: | |
branches: [ "doc" ] | |
workflow_dispatch: | |
jobs: | |
tangle: | |
permissions: | |
contents: write | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install Noweb | |
run: sudo apt install noweb | |
- name: Checkout master branch | |
uses: actions/checkout@v4 | |
with: | |
ref: master | |
path: master | |
token: ${{ secrets.PAT }} | |
- name: Tangle | |
run: | | |
notangle -RMakefile -t8 Makefile.nw >master/Makefile | |
notangle -Rproject.mk -t8 Makefile.nw >master/project.mk | |
- name: Compute commit message | |
id: msg | |
run: printf 'header=%s\n' "$(git log -n1 --oneline)" | tee "$GITHUB_OUTPUT" | |
- name: Push the modified Makefile | |
uses: EndBug/add-and-commit@v9 | |
with: | |
cwd: master | |
add: | | |
Makefile | |
project.mk | |
message: | | |
Update Makefile from `doc` branch | |
Built from commit ${{ steps.msg.outputs.header }} | |
default_author: user_info | |
pathspec_error_handling: exitAtEnd | |
push: true | |
weave: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Pages | |
id: pages | |
uses: actions/configure-pages@v5 | |
- name: Install Noweb | |
run: sudo apt install noweb texlive-latex-extra texlive-lang-english texlive-lang-french texlive-xetex | |
- name: Weave | |
run: | | |
./weave.sh | |
mkdir _site | |
cp out/build-system.pdf _site | |
- name: Upload generated PDF | |
uses: actions/upload-pages-artifact@v3 | |
publish: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: weave | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |