knoepfel building the Phlex design document π #159
Workflow file for this run
This file contains hidden or 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: Build design document | |
| run-name: ${{ github.actor }} building the Phlex design document π | |
| on: | |
| push: | |
| paths: | |
| - 'doc/**' | |
| workflow_dispatch: # Allow manual triggering | |
| jobs: | |
| build-design-document: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| # Give the default GITHUB_TOKEN write permission to commit and push the | |
| # added or changed files to the repository. | |
| contents: write | |
| container: | |
| image: ghcr.io/framework-r-d/phlexdoc:2025-06-06 | |
| steps: | |
| - name: Check out repository code (main branch) | |
| uses: actions/checkout@v4 | |
| with: | |
| path: main | |
| - name: Store commit SHA | |
| working-directory: ./main | |
| run: | | |
| echo "PHLEX_DESIGN_COMMIT=$(git rev-parse --short HEAD)" >> "$GITHUB_ENV" | |
| - name: Build LaTeX document | |
| working-directory: ./main/doc | |
| run: | | |
| dot -c # because it's weird out of the box | |
| git config --global --add safe.directory $GITHUB_WORKSPACE | |
| PHLEX_CONCEPTUAL_DESIGN_ONLY=1 make latexpdf | |
| - name: Upload PDF document | |
| id: upload-pdf-document | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: phlex-design-pdf | |
| path: ./main/doc/build/latex/phlex-design*.pdf | |
| if-no-files-found: error | |
| # - name: Build HTML document | |
| # working-directory: ./main/doc | |
| # run: | | |
| # dot -c # because it's weird out of the box | |
| # git config --global --add safe.directory $GITHUB_WORKSPACE | |
| # PHLEX_CONCEPTUAL_DESIGN_ONLY=1 SPHINX_EXISTING_PDF=${{ steps.upload-pdf-document.outputs.artifact-url }} make html | |
| # # GitHub pages don't like directories that begin with an underscore | |
| # for d in static sources images; do mv build/html/_$d build/html/$d; done | |
| # for d in static sources images; do sed -i -e "s|_$d/|$d/|g" $(find build/html/ -name \*.html); done | |
| # | |
| # - name: Check out repository code (gh-pages branch) | |
| # uses: actions/checkout@v4 | |
| # with: | |
| # path: gh-pages | |
| # ref: gh-pages | |
| # | |
| # - name: Push HTML pages to gh-pages branch | |
| # working-directory: ./gh-pages/ | |
| # run: | | |
| # # Remove the contents to avoid retaining generated images that are no longer used | |
| # rm -rf * | |
| # # Copy built HTML pages into gh-pages source tree | |
| # cp -r ../main/doc/build/html/* . | |
| # # Note: the following account information will not work on GHES | |
| # git config user.name "github-actions[bot]" | |
| # git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| # git add . | |
| # git commit -m "[auto-generated] Pages for commit ${PHLEX_DESIGN_COMMIT}" && git push |