Skip to content

Commit 26dcd7a

Browse files
committed
ci: rename main.yml to ci.yml, fix artifact actions to @v4
1 parent 77848a5 commit 26dcd7a

File tree

1 file changed

+50
-0
lines changed

1 file changed

+50
-0
lines changed

.github/workflows/ci.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
jobs:
19+
ci:
20+
runs-on: ubuntu-latest
21+
timeout-minutes: 15
22+
steps:
23+
- uses: actions/checkout@v6
24+
- uses: ./.github/actions/setup-bun
25+
- run: bun run ci
26+
- uses: actions/upload-artifact@v4
27+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
28+
with:
29+
name: dist
30+
path: dist
31+
retention-days: 1
32+
33+
deploy:
34+
needs: ci
35+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
36+
runs-on: ubuntu-latest
37+
timeout-minutes: 5
38+
environment:
39+
name: github-pages
40+
url: ${{ steps.deployment.outputs.page_url }}
41+
steps:
42+
- uses: actions/download-artifact@v4
43+
with:
44+
name: dist
45+
path: dist
46+
- uses: actions/upload-pages-artifact@v4
47+
with:
48+
path: dist
49+
- uses: actions/deploy-pages@v4
50+
id: deployment

0 commit comments

Comments
 (0)