Skip to content

Commit ec62e8d

Browse files
author
stellaaa42
committed
workflow action build
1 parent 7c407c0 commit ec62e8d

File tree

2 files changed

+48
-4
lines changed

2 files changed

+48
-4
lines changed

.github/workflows/build.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Build
2+
3+
on:
4+
# push:
5+
# branches:
6+
# - main
7+
# pull_request:
8+
# workflow_dispatch:
9+
10+
permissions:
11+
checks: write
12+
contents: read
13+
pull-requests: write
14+
15+
jobs:
16+
test:
17+
name: Run tests
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: oven-sh/setup-bun@v2
22+
23+
- run: bun install --frozen-lockfile
24+
- run: bun test
25+
26+
build:
27+
name: Build site
28+
runs-on: ubuntu-latest
29+
steps:
30+
- uses: actions/checkout@v4
31+
32+
- run: bun install --frozen-lockfile
33+
34+
- if: github.event_name != 'pull_request' && github.ref == 'ref/heads/main'
35+
name: Build (prod)
36+
run: bun run build
37+
env:
38+
39+
- if: github.event_name == 'pull_request' || github.ref != 'ref/heads/main'
40+
name: Build (dev)
41+
run: bun run build
42+
43+
- name: Deploy
44+
if: github.event_name == 'push' && github.ref == 'ref/heads/main'

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
### dev
1+
## dev
2+
`./dev.sh`
23

3-
`./dev.sh`
4+
## deploy
45

5-
6-
### deploy
6+
``

0 commit comments

Comments
 (0)