Skip to content

Commit

Permalink
ci: run tests
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienbrault committed Nov 27, 2023
1 parent 0b57ba1 commit 90c73f3
Showing 1 changed file with 27 additions and 12 deletions.
39 changes: 27 additions & 12 deletions .github/workflows/bun_build_and_deploy.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
name: Bun Build and Deploy to GitHub Pages
name: Test, then Build/Deploy to GitHub Pages

on:
push:
branches:
- main
pull_request:

jobs:
build:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

Expand All @@ -20,16 +20,13 @@ jobs:
- name: Install Dependencies
run: bun install

- name: Run Build
run: bun run build-site
- name: Run Tests
run: bun test

- name: Upload Artifacts
uses: actions/upload-pages-artifact@v1
with:
path: ./build

deploy:
needs: build
build_and_deploy:
if: >
github.event_name == 'push' && github.ref == 'refs/heads/main'
needs: test
runs-on: ubuntu-latest
environment:
name: github-pages
Expand All @@ -38,5 +35,23 @@ jobs:
id-token: write

steps:
- uses: actions/checkout@v2

- name: Setup Bun
uses: oven-sh/setup-bun@v1
with:
bun-version: latest

- name: Install Dependencies
run: bun install

- name: Run Build
run: bun run build-site

- name: Upload Artifacts
uses: actions/upload-pages-artifact@v1
with:
path: ./build

- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v2

0 comments on commit 90c73f3

Please sign in to comment.