Skip to content

Commit d39d282

Browse files
ggonzalez94claude
andcommitted
feat: add CI/CD workflows and typo checking
Add GitHub Actions workflows for Vercel preview/production deploys and a CI workflow with build verification and typo checking. Fix typo in pacaya-fork.mdx (Contestion → Contestation). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 2ce6132 commit d39d282

File tree

5 files changed

+170
-1
lines changed

5 files changed

+170
-1
lines changed

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: ${{ github.workflow }}-${{ github.ref }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
build:
14+
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'dependabot') }}
15+
runs-on: [arc-runner-set]
16+
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v6
20+
21+
- name: Install pnpm
22+
uses: pnpm/action-setup@v5
23+
24+
- name: Install Node.js
25+
uses: actions/setup-node@v6
26+
with:
27+
node-version: 20
28+
cache: pnpm
29+
30+
- name: Install dependencies
31+
run: pnpm install
32+
33+
- name: Build
34+
run: pnpm run build
35+
36+
typo-check:
37+
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'dependabot') }}
38+
runs-on: [arc-runner-set]
39+
40+
steps:
41+
- name: Checkout repository
42+
uses: actions/checkout@v6
43+
44+
- name: Install wget
45+
run: |
46+
if ! command -v wget &> /dev/null; then
47+
sudo apt-get update && sudo apt-get install -y wget
48+
fi
49+
50+
- name: Check for typos
51+
uses: crate-ci/typos@v1.44.0
52+
with:
53+
config: ${{ github.workspace }}/_typos.toml
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
name: Deploy Preview
2+
3+
env:
4+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
5+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
6+
7+
on:
8+
pull_request:
9+
types: [opened, synchronize, reopened, ready_for_review]
10+
branches:
11+
- main
12+
13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.ref }}
15+
cancel-in-progress: true
16+
17+
permissions:
18+
pull-requests: write
19+
20+
jobs:
21+
deploy-preview:
22+
if: ${{ github.event.pull_request.draft == false && !startsWith(github.head_ref, 'dependabot') && github.event.pull_request.head.repo.fork == false }}
23+
runs-on: [arc-runner-set]
24+
25+
steps:
26+
- name: Checkout repository
27+
uses: actions/checkout@v6
28+
29+
- name: Install pnpm
30+
uses: pnpm/action-setup@v5
31+
32+
- name: Install Node.js
33+
uses: actions/setup-node@v6
34+
with:
35+
node-version: 20
36+
cache: pnpm
37+
38+
- name: Install dependencies
39+
run: pnpm install
40+
41+
- name: Install Vercel CLI
42+
run: pnpm add --global vercel@latest
43+
44+
- name: Pull Vercel Environment Information
45+
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }}
46+
47+
- name: Build Project Artifacts
48+
run: vercel build --token=${{ secrets.VERCEL_TOKEN }}
49+
50+
- name: Deploy Project Artifacts to Vercel
51+
id: deploy
52+
run: |
53+
DEPLOY_URL=$(vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }})
54+
echo "url=$DEPLOY_URL" >> "$GITHUB_OUTPUT"
55+
56+
- name: Comment preview URL on PR
57+
run: |
58+
gh pr comment ${{ github.event.pull_request.number }} \
59+
--body "**Preview:** ${{ steps.deploy.outputs.url }}" \
60+
--edit-last || \
61+
gh pr comment ${{ github.event.pull_request.number }} \
62+
--body "**Preview:** ${{ steps.deploy.outputs.url }}"
63+
env:
64+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy Production
2+
3+
env:
4+
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
5+
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
12+
concurrency:
13+
group: ${{ github.workflow }}-${{ github.ref }}
14+
cancel-in-progress: true
15+
16+
jobs:
17+
deploy-production:
18+
runs-on: [arc-runner-set]
19+
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v6
23+
24+
- name: Install pnpm
25+
uses: pnpm/action-setup@v5
26+
27+
- name: Install Node.js
28+
uses: actions/setup-node@v6
29+
with:
30+
node-version: 20
31+
cache: pnpm
32+
33+
- name: Install dependencies
34+
run: pnpm install
35+
36+
- name: Install Vercel CLI
37+
run: pnpm add --global vercel@latest
38+
39+
- name: Pull Vercel Environment Information
40+
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
41+
42+
- name: Build Project Artifacts
43+
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
44+
45+
- name: Deploy Project Artifacts to Vercel
46+
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}

_typos.toml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[files]
2+
extend-exclude = ["CHANGELOG.md"]
3+
4+
[default.extend-words]
5+
# "mis-encoded" is valid (mis- prefix)
6+
mis = "mis"

docs/pages/protocol/pacaya-fork.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Pacaya changed the protocol so that:
1414

1515
This makes smaller, more frequent blocks economically viable.
1616

17-
## Multi-Proof Replacing Contestion
17+
## Multi-Proof Replacing Contestation
1818

1919
Pacaya removed proof contestation and replaced it with **multi-proving**.
2020

0 commit comments

Comments
 (0)