This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
Merge pull request #41 from PSDTools/dependabot/npm_and_yarn/zod-vali… #80
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: Deploy to GitHub Pages | |
env: | |
CI: true | |
on: | |
# Runs on pushes to the default branch | |
push: | |
branches: | |
- main | |
# Runs on PRs targeting the default branch | |
pull_request: | |
types: [opened, synchronize, reopened, closed] | |
branches: | |
- main | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build_job: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v3.5.0 | |
with: | |
submodules: true | |
- name: Install bun | |
uses: oven-sh/setup-bun@9b21598af8d4dfc302e5a30250007de0fda92acc # v1.1.0 | |
- name: Cache | |
uses: actions/cache@13aacd865c20de90d75de3b17ebe84f7a17d57d2 # v4.0.0 | |
with: | |
path: | | |
.turbo | |
node_modules | |
~/.bun/install/cache | |
key: ${{ runner.os }}-bun-turbo-${{ hashFiles('**/turbo.json') }} | |
- name: Install dependencies | |
run: bun install --frozen-lockfile | |
- name: Lint & Vite Build | |
# Use --bun once the next release is cut. | |
# Right now, bun is incorrectly parsing dotfiles. | |
run: bun run turbo build | |
- name: Redirect 404 to Index for SPA | |
run: cp dist/index.html dist/404.html | |
- name: Setup Pages | |
uses: actions/configure-pages@1f0c5cde4bc74cd7e1254d0cb4de8d49e9068c7d # v4.0.0 | |
- name: Upload Artifact | |
uses: actions/upload-pages-artifact@0252fc4ba7626f0298f0cf00902a25c6afc77fa8 # v3.0.0 | |
with: | |
path: "./dist/" | |
deploy_job: | |
name: Deploy | |
needs: [build_job] | |
if: github.event_name == 'push' | |
runs-on: ubuntu-latest | |
timeout-minutes: 4 | |
permissions: | |
pages: write | |
id-token: write | |
contents: read | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- id: deployment | |
uses: actions/deploy-pages@87c3283f01cd6fe19a0ab93a23b2f6fcba5a8e42 # v4.0.3 |