about page #7
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: Deploy static page to GitHub Pages | |
| on: | |
| # Runs on pushes targeting the default branch | |
| push: | |
| branches: ['main'] | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | |
| # Cancel current deployment when a new push occurs | |
| concurrency: | |
| group: 'pages' | |
| cancel-in-progress: false | |
| jobs: | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Compute build metadata | |
| id: meta | |
| run: | | |
| echo "short_sha=$(echo ${{ github.sha }} | cut -c1-7)" >> $GITHUB_OUTPUT | |
| echo "timestamp=$(TZ=Europe/Zurich date '+%Y-%m-%d %H:%M %Z')" >> $GITHUB_OUTPUT | |
| - name: Inject build info into about.html | |
| uses: cschleiden/replace-tokens@v1 | |
| with: | |
| files: '["about.html"]' | |
| env: | |
| SHORT_SHA: ${{ steps.meta.outputs.short_sha }} | |
| TIMESTAMP: ${{ steps.meta.outputs.timestamp }} | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| # Upload the entire repository root (index.html lives there) | |
| path: '.' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |