π [chore] config updates #314
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 & Deploy | |
| on: | |
| push: | |
| branches: ["main"] | |
| pull_request: | |
| branches: ["main"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| build: | |
| name: π Build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: π Checkout | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: βοΈ Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version-file: "package.json" | |
| - name: π¦ Install Congo dependencies | |
| run: | | |
| cd themes/congo | |
| npm ci | |
| - name: βοΈ Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| - name: βοΈ Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - name: βοΈ Setup pnpm cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: π¦ Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: β¬οΈ Download static resources | |
| run: | | |
| scripts/download_static.sh | |
| - name: ποΈ Build CSS | |
| run: npm run css-build | |
| - name: ποΈ Build site | |
| uses: tomy0000000/actions/hugo-github-pages@main | |
| with: | |
| hugo_version: "0.154.4" | |
| upload: false | |
| # Temporary fix before gohugoio/hugo#5161 is resolved | |
| - name: π§ Fix 404 Page | |
| run: | | |
| scripts/patch_404.sh | |
| - name: β¬οΈ Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./public | |
| deploy: | |
| name: π Deploy | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
| steps: | |
| - name: π Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |