Append experimental information #37
This file contains 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 and deploy contents to Pages | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Use Node.js 20.x | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: 'pnpm' | |
- name: Install dependencies | |
run: pnpm install | |
- name: Run validation checks | |
run: | | |
pnpm lint | |
pnpm test | |
- name: Build | |
run: pnpm build --base=/coding-theory | |
- name: Upload build files | |
uses: actions/upload-artifact@v4 | |
with: | |
name: app-build | |
path: ./dist | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Download build files | |
uses: actions/download-artifact@v4 | |
with: | |
name: app-build | |
path: ./build | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: './build' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |