Skip to content
Merged
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
2 changes: 2 additions & 0 deletions .env.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Site URL - must match SITE_URL in wrangler.jsonc for the target environment
SITE_URL=https://johnhooks.io
18 changes: 0 additions & 18 deletions .eslintignore

This file was deleted.

53 changes: 0 additions & 53 deletions .eslintrc.cjs

This file was deleted.

61 changes: 0 additions & 61 deletions .github/actions/build/action.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Setup
description: Setup Node.js, pnpm, and install dependencies

runs:
using: composite
steps:
- name: Setup pnpm
uses: pnpm/action-setup@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "pnpm"

- name: Install Dependencies
shell: bash
run: pnpm install --frozen-lockfile
71 changes: 71 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: CI

on:
push:
branches:
- main
pull_request:

jobs:
build:
runs-on: ubuntu-latest

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

- name: Setup
uses: ./.github/actions/setup

- name: Setup Environment
run: cp .env.dist .env

- name: Build
run: pnpm build

- name: Upload Build Artifacts
uses: actions/upload-artifact@v4
with:
name: build-output
path: |
.svelte-kit
node_modules
retention-days: 1

lint:
needs: build
runs-on: ubuntu-latest

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

- name: Setup
uses: ./.github/actions/setup

- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: build-output

- name: Run Lint
run: pnpm lint

check:
needs: build
runs-on: ubuntu-latest

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

- name: Setup
uses: ./.github/actions/setup

- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: build-output

- name: Run Type Check
run: pnpm check
21 changes: 21 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Deploy Production

on:
workflow_dispatch:
inputs:
ref:
description: "Branch or tag to deploy (leave empty for default branch)"
required: false
type: string
default: ""

jobs:
deploy:
uses: ./.github/workflows/wrangler-deploy.yml
with:
environment: production
site_url: https://johnhooks.io
ref: ${{ inputs.ref }}
secrets:
cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
cloudflare_account_id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
21 changes: 21 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Deploy Staging

on:
workflow_dispatch:
inputs:
ref:
description: "Branch or tag to deploy (leave empty for default branch)"
required: false
type: string
default: ""

jobs:
deploy:
uses: ./.github/workflows/wrangler-deploy.yml
with:
environment: staging
site_url: https://website-staging.johnhooks.workers.dev
ref: ${{ inputs.ref }}
secrets:
cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
cloudflare_account_id: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
70 changes: 0 additions & 70 deletions .github/workflows/deploy.yml

This file was deleted.

26 changes: 0 additions & 26 deletions .github/workflows/pipeline.yml

This file was deleted.

Loading