Skip to content

Commit

Permalink
Deploy documentation to vercel (#476)
Browse files Browse the repository at this point in the history
  • Loading branch information
fracek authored Aug 7, 2024
2 parents aada055 + 4cf2995 commit 2b08aa3
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 14 deletions.
8 changes: 0 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,4 @@
name: Build
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}

on:
pull_request:
Expand Down Expand Up @@ -42,7 +38,3 @@ jobs:
run: pnpm build
- name: Run test
run: pnpm test:ci
- name: Vercel whoami
run: echo "${{ env.VERCEL_ORG_ID }}" | wc -c
- name: Vercel whoami
run: echo "${{ env.VERCEL_TOKEN }}" | wc -c
34 changes: 34 additions & 0 deletions .github/workflows/release-documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Release documentation
env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }}

on:
push:
branches:
- main

jobs:
release-documentation:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set Node version
uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
with:
version: 8
- name: Install dependencies
run: pnpm install --strict-peer-dependencies=false --no-frozen-lockfile
- name: Build Project Artifacts
run: pnpm build --filter=@starknet-react/docs
- name: Pull Vercel Environment Information
run: pnpm dlx vercel pull --cwd=docs --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build Project Artifacts
run: pnpm dlx vercel build --cwd=docs --prod --token=${{ secrets.VERCEL_TOKEN }}
- name: Deploy Project Artifacts to Vercel
run: pnpm dlx vercel deploy --cwd=docs --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
4 changes: 1 addition & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
name: Release

on:
push:
branches:
- main
workflow_call: {}

jobs:
release:
Expand Down
28 changes: 25 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 2b08aa3

Please sign in to comment.