fix(clade): correct CLADE uuid (deterministic v5, was template residu… #68
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
| # SPDX-License-Identifier: MPL-2.0 | |
| name: GitHub Pages | |
| on: | |
| push: | |
| branches: [main, master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4 | |
| - name: Build static site | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| rm -rf _site | |
| mkdir -p _site | |
| today="$(date +%Y-%m-%d)" | |
| repo_name="${{ github.event.repository.name }}" | |
| repo_url="https://github.com/${{ github.repository }}" | |
| readme_link="" | |
| if [ -f README.md ]; then | |
| readme_link="<li><a href=\"${repo_url}/blob/${{ github.ref_name }}/README.md\">README</a></li>" | |
| elif [ -f README.adoc ]; then | |
| readme_link="<li><a href=\"${repo_url}/blob/${{ github.ref_name }}/README.adoc\">README</a></li>" | |
| fi | |
| docs_link="" | |
| if [ -d docs ]; then | |
| docs_link="<li><a href=\"${repo_url}/tree/${{ github.ref_name }}/docs\">docs/</a></li>" | |
| fi | |
| cat > _site/index.html <<EOF | |
| <!doctype html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>${repo_name}</title> | |
| <style> | |
| body { font-family: system-ui, sans-serif; max-width: 48rem; margin: 4rem auto; padding: 0 1rem; line-height: 1.5; color: #1f2937; } | |
| a { color: #0f766e; } | |
| code { background: #f3f4f6; padding: 0.15rem 0.3rem; border-radius: 0.25rem; } | |
| </style> | |
| </head> | |
| <body> | |
| <h1>${repo_name}</h1> | |
| <p>Static documentation site for <code>${{ github.repository }}</code>.</p> | |
| <ul> | |
| <li><a href="${repo_url}">Source repository</a></li> | |
| ${readme_link} | |
| ${docs_link} | |
| </ul> | |
| <p>Generated on ${today} from <code>${{ github.sha }}</code>.</p> | |
| </body> | |
| </html> | |
| EOF | |
| touch _site/.nojekyll | |
| - name: Setup Pages | |
| uses: actions/configure-pages@45bfe0192ca1faeb007ade9deae92b16b8254a0d # v6.0.0 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0 | |
| with: | |
| path: '_site' | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0 |