This repository has been archived by the owner on Jul 10, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (65 loc) · 1.67 KB
/
deploy.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
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/[email protected]
with:
submodules: true
- name: Install bun
uses: oven-sh/setup-bun@v1
- name: Cache
uses: actions/[email protected]
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
run: bun --bun run turbo build
- name: Redirect 404 to Index for SPA
run: cp dist/index.html dist/404.html
- name: Setup Pages
uses: actions/[email protected]
- name: Upload Artifact
uses: actions/[email protected]
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/[email protected]