Skip to content

Commit f198cc8

Browse files
authored
Merge pull request #47 from ax-sh/develop
pr:deploy
2 parents 156100e + a9117a3 commit f198cc8

File tree

1 file changed

+4
-27
lines changed

1 file changed

+4
-27
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
1-
# To get started with Next.js see: https://nextjs.org/docs/getting-started
2-
#
31
name: ✈️Deploy Next.js site to GitHub Pages
42

53
on:
6-
# Runs on pushes targeting the default branch
74
push:
85
branches: ["master"]
96

@@ -16,25 +13,16 @@ permissions:
1613
pages: write
1714
id-token: write
1815

19-
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
20-
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
2116
concurrency:
2217
group: "pages"
2318
cancel-in-progress: false
2419

25-
# BE VERY CAREFUL WHAT YOU EDIT HERE DEBUGGING THIS IS A PAIN
26-
2720
jobs:
28-
# Build job
29-
build:
21+
build-and-test:
3022
runs-on: ubuntu-latest
3123
steps:
3224
- name: 🛎️Checkout
3325
uses: actions/checkout@v4
34-
# - name: Setup Node
35-
# uses: actions/setup-node@v4
36-
# with:
37-
# node-version: "20"
3826
- name: Setup Bun.js ⚙️
3927
uses: oven-sh/setup-bun@v2
4028
- name: Setup Pages
@@ -55,30 +43,19 @@ jobs:
5543
run: bun install
5644
- name: Build with Next.js
5745
run: bunx next build
46+
- name: 🧪Run tests
47+
run: bun vitest run
5848
- name: Upload artifact
5949
uses: actions/upload-pages-artifact@v3
6050
with:
6151
path: ./out
62-
test:
63-
runs-on: ubuntu-latest
64-
needs: [build]
65-
steps:
66-
- name: 🛎️Checkout
67-
uses: actions/checkout@v4
68-
- name: Setup Bun.js ⚙️
69-
uses: oven-sh/setup-bun@v2
70-
- run: bun i
71-
- run: bun vitest run
7252

73-
# Deployment job
7453
deploy:
7554
environment:
7655
name: github-pages
7756
url: ${{ steps.deployment.outputs.page_url }}
7857
runs-on: ubuntu-latest
79-
needs:
80-
- build
81-
- test
58+
needs: build-and-test
8259
steps:
8360
- name: ✈️Deploy to GitHub Pages
8461
id: deployment

0 commit comments

Comments
 (0)