fix(ci): resolve actions runtime warnings #111
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 | |
| on: | |
| push: | |
| branches: [main] | |
| workflow_dispatch: | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: true | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| env: | |
| CI: true | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Configure GitHub Pages | |
| uses: actions/configure-pages@v5 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v5 | |
| - name: Use Node.js LTS | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: lts/* | |
| check-latest: true | |
| cache: pnpm | |
| - name: Setup Next.js cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: .next/cache | |
| key: ${{ runner.os }}-nextjs-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nextjs- | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Build project | |
| run: pnpm build | |
| - name: Generate sitemap | |
| run: | | |
| pnpm run generate-sitemap | |
| - name: Add CNAME | |
| run: | | |
| echo "mx-space.js.org" > out/CNAME | |
| - name: Upload GitHub Pages artifact | |
| uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: out | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |