[ImgBot] Optimize images #26
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/Test/Deploy | |
on: | |
push: | |
workflow_dispatch: | |
pull_request: | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: false | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: 'recursive' | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
- name: Install Playwright | |
run: pnpm install -D @playwright/test@latest | |
- name: Install Playwright Browsers | |
run: pnpm exec playwright install --with-deps | |
- name: Install, build, and upload your site | |
uses: withastro/action@v3 | |
with: | |
# path: . # The root location of your Astro project inside the repository. (optional) | |
node-version: 22 # The specific version of Node that should be used to build your site. Defaults to 20. (optional) | |
package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional) | |
deploy: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: build | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/[email protected] | |
lint: | |
name: Lint | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
# cache: 'bun' | |
# cache-dependency-path: ./bun.lock | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: 'latest' # or "latest" | |
- name: Install | |
run: bun install | |
- name: Lint | |
run: bun run lint-ci | |
- name: Spellcheck | |
run: bun run spellcheck |