Re-add omarchy-auto-theme to Development Tools (#53) #35
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
| # GitHub Pages Deployment Workflow | |
| name: Deploy GitHub Pages | |
| on: | |
| # Runs on pushes targeting the default branch | |
| push: | |
| branches: ["main"] | |
| paths: | |
| - '.pages/**' | |
| - 'README.md' # Rebuild when resources change | |
| # 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 | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build-and-deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Bundle README into HTML | |
| run: | | |
| # Encode README.md as base64 | |
| README_BASE64=$(base64 -w 0 README.md) | |
| # Replace placeholder in index.html with bundled content | |
| sed -i "s|__README_CONTENT__|${README_BASE64}|g" .pages/index.html | |
| echo "README bundled successfully ($(echo $README_BASE64 | wc -c) bytes)" | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v4 | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: '.pages' | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |