Skip to content

ci(depoly): Deploy ci #105

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 4 commits into from
May 26, 2024
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
54 changes: 54 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Deploy Documentation

on:
push:
pull_request:
workflow_dispatch:

jobs:
vercel:
runs-on: ubuntu-latest

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

- name: Cache Dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-node-

- name: Setup node
uses: actions/setup-node@v4.0.2
with:
cache: npm

- name: Build
run: |
yarn install --frozen-lockfile
npm run build

- name: Run Tests Locally
run: npm run test:docs

- name: Deploy to Staging
id: deploy-vercel-staging
uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
scope: ${{ secrets.VERCEL_ORG_ID }}

- name: Deploy to Production
uses: amondnet/vercel-action@v25
id: deploy-vercel-production
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
vercel-args: "--prod"
scope: ${{ secrets.VERCEL_ORG_ID }}
4 changes: 2 additions & 2 deletions docs/src/pages/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,9 @@ export function Feature({
>
<h1 className="text-4xl font-bold">
<span className="bg-clip-text text-transparent bg-gradient-to-r from-pink-500 to-violet-500">
Thread
<span>Thread</span>
</span>
- v2.0.2
<span>&nbsp;- v2.0.2</span>
</h1>
<div className="text-center">
<PackageManager />
Expand Down