Update GitHub Actions for Node 24 #20
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 to Cloudflare and GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| build: | |
| runs-on: self-hosted | |
| timeout-minutes: 4320 | |
| name: Build Project | |
| env: | |
| ENABLE_DOCUSAURUS_EXPERIMENTAL: 'true' | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| # Self-hosted runner: keep node_modules, .docusaurus and the | |
| # node_modules/.cache/rspack persistent cache between runs. | |
| # The default (clean: true) runs `git clean -ffdx`, which deletes | |
| # all git-ignored files and wipes the rspack/MDX build caches, | |
| # forcing a cold ~2h rebuild every push. clean: false makes | |
| # incremental builds reuse the cache (rspackPersistentCache + | |
| # mdxCrossCompilerCache), so only changed docs are recompiled. | |
| clean: false | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Build | |
| run: npm run build_32g | |
| - name: Upload build artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: build-artifact | |
| path: build | |
| retention-days: 1 # Keeps the artifact for 1 day | |
| # deploy-cloudflare: | |
| # runs-on: ubuntu-latest | |
| # needs: build | |
| # name: Deploy to Cloudflare | |
| # steps: | |
| # - uses: actions/checkout@v5 | |
| # - name: Download build artifact | |
| # uses: actions/download-artifact@v7 | |
| # with: | |
| # name: build-artifact | |
| # path: build | |
| # - name: Deploy to Cloudflare Pages | |
| # uses: cloudflare/wrangler-action@v3 | |
| # with: | |
| # apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| # accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
| # command: pages deploy build --project-name=cool-coding | |
| deploy-github-pages: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| runs-on: ubuntu-latest | |
| needs: build | |
| name: Deploy to GitHub Pages | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Download build artifact | |
| uses: actions/download-artifact@v7 | |
| with: | |
| name: build-artifact | |
| path: build | |
| - name: Deploy to GitHub Pages | |
| uses: actions/upload-pages-artifact@v5 | |
| with: | |
| path: build | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v5 | |
| # submit-url-seo: | |
| # name: Submit URL to IndexNow | |
| # runs-on: ubuntu-latest | |
| # needs: [ build, deploy-github-pages ] | |
| # steps: | |
| # - uses: actions/checkout@v5 | |
| # - name: Install Dependencies | |
| # run: pip install requests | |
| # - name: Submit URL to IndexNow | |
| # run: | | |
| # bash submit_url.sh | |