Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 0 additions & 34 deletions .github/workflows/ci.yml

This file was deleted.

87 changes: 67 additions & 20 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,100 @@
name: Deploy to GitHub Pages
name: Unified CI/CD Pipeline

on:
push:
branches: 'main'
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read

jobs:
build_site:
type-check:
name: Type Check
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

# If you're using pnpm, add this step then change the commands and cache key below to use `pnpm`
# - name: Install pnpm
# uses: pnpm/action-setup@v3
# with:
# version: 8
- name: Install Bun
uses: oven-sh/setup-bun@v1

- name: Install dependencies
run: bun install

- name: Run svelte-check
run: bun run check

lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Bun
uses: oven-sh/setup-bun@v1

- name: Install dependencies
run: bun install

- name: build
env:
BASE_PATH: '/${{ github.event.repository.name }}'
run: |
bun run build
- name: Run lint
run: bun run lint

- name: Upload Artifacts
uses: actions/upload-pages-artifact@v3
with:
# this should match the `pages` option in your adapter-static options
path: 'build/'
test:
name: Test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install Bun
uses: oven-sh/setup-bun@v1

- name: Install dependencies
run: bun install

- name: Run tests
run: bun run test

deploy:
needs: build_site
name: Deploy
needs: [type-check, lint, test]
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write
contents: read

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy
- name: Checkout
uses: actions/checkout@v4

- name: Install Bun
uses: oven-sh/setup-bun@v1

- name: Install dependencies
run: bun install

- name: Build site
env:
BASE_PATH: '/${{ github.event.repository.name }}'
run: bun run build

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'build/'

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
Loading