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
21 changes: 21 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
on:
workflow_call:

jobs:
lint:
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: setup bun
uses: oven-sh/setup-bun@v2

- name: install dependencies
run: bun install --frozen-lockfile

- name: lint
run: bun lint

- name: check formatting
run: bun format:check
36 changes: 36 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: ci
on:
push:
branches:
- main

concurrency:
group: ci-main
cancel-in-progress: false

jobs:
code-style:
uses: ./.github/workflows/lint.yml

typescript:
uses: ./.github/workflows/typescript-typecheck.yml

# tests:
# uses: ./.github/workflows/tests.yml

website:
uses: ./.github/workflows/website.yml
secrets: inherit

# storybook:
# uses: ./.github/workflows/storybook.yml
# secrets: inherit

# release:
# uses: the-guild-org/shared-config/.github/workflows/release.yml@main
# with:
# buildScript: build
# packageManager: bun
# secrets:
# githubToken: ${{ secrets.GITHUB_TOKEN }}
# npmToken: ${{ secrets.NPM_TOKEN }}
21 changes: 21 additions & 0 deletions .github/workflows/on-mdx-change.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: on-mdx-change
on:
pull_request:
paths:
- "packages/documentation/content/**/*.mdx"

jobs:
noop:
runs-on: ubuntu-24.04
steps:
- run: echo "Bun is not supported by the-guild-org/shared-config yet"
# validate-mdx-links:
# uses: the-guild-org/shared-config/.github/workflows/validate-mdx-links.yaml@main
# with:
# packageManager: bun
# cwd: packages/documentation
# files: content/**/*.mdx
# version: "1.1.0"
# concurrency:
# group: mdx-${{ github.workflow }}-${{ github.ref }}
# cancel-in-progress: true
41 changes: 41 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: pr
on:
pull_request: {}

concurrency:
group: pr-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
lint:
uses: ./.github/workflows/lint.yml

typescript:
uses: ./.github/workflows/typescript-typecheck.yml

# todo: add tests
# tests:
# uses: ./.github/workflows/tests.yml

website-preview:
uses: ./.github/workflows/website.yml
if: ${{ !github.event.pull_request.head.repo.fork }}
secrets: inherit

# todo: add storybook (or lighter alternative) for the design system
# storybook-preview:
# uses: ./.github/workflows/storybook.yml
# if: ${{ !github.event.pull_request.head.repo.fork }}
# secrets: inherit

# todo: release snapshots of the libraries (if we need them)
# alpha:
# uses: the-guild-org/shared-config/.github/workflows/release-snapshot.yml@main
# if: ${{ github.event.pull_request.title != 'Upcoming Release Changes' }}
# with:
# npmTag: alpha
# buildScript: build
# packageManager: bun
# secrets:
# githubToken: ${{ secrets.GITHUB_TOKEN }}
# npmToken: ${{ secrets.NPM_TOKEN }}
18 changes: 18 additions & 0 deletions .github/workflows/typescript-typecheck.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
workflow_call:

jobs:
typecheck:
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: setup bun
uses: oven-sh/setup-bun@v2

- name: install dependencies
run: bun install --frozen-lockfile

- name: typecheck
run: bun run typecheck
46 changes: 46 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
workflow_call:

jobs:
deployment:
runs-on: ubuntu-24.04
steps:
- name: checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

- name: setup bun
uses: oven-sh/setup-bun@v2

- name: install dependencies
run: bun install --frozen-lockfile

- name: "temporary deploy to Piotr's Vercel account"
env:
VERCEL: "1"
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}
VERCEL_ORG_ID: team_yDNaxOv70B1OWKrLECwUJo5H
VERCEL_PROJECT_ID: prj_ISkyItJ2df8zZAS564zOrYQYxCxG
run: |
cd packages/documentation
bun i -g vercel

if [ "${{ github.ref }}" = "refs/heads/main" ]; then
PROD_FLAG="--prod"
else
PROD_FLAG=""
fi

vercel pull --yes --token=$VERCEL_TOKEN
vercel build $PROD_FLAG
vercel deploy --prebuilt --token=$VERCEL_TOKEN $PROD_FLAG

# TODO: Deploy to Vercel or CloudFlare
# - uses: the-guild-org/shared-config/website-cf@main
# name: build and deploy website
# with:
# cloudflareApiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
# cloudflareAccountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
# githubToken: ${{ secrets.GITHUB_TOKEN }}
# projectName: hive-docs
# prId: ${{ github.event.pull_request.number }}
# mainBranch: main
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
packages/documentation/.source
*.gen.*
Loading