Skip to content

Commit

Permalink
feat: copy action from hai
Browse files Browse the repository at this point in the history
  • Loading branch information
dristpunk committed Dec 7, 2023
1 parent c777beb commit 76c3bcc
Showing 1 changed file with 50 additions and 0 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy docs

on:
push:
branches:
- main
- dev

jobs:
deploy-docs:
if: github.repository == 'hai-on-op/hai'
name: Deploy docs
runs-on: ubuntu-latest
environment:
name: ${{ github.ref_name == 'main' && 'Prod' || 'Dev' }}

steps:
- uses: actions/checkout@v3

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1

- name: Install node
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'yarn'

- name: Install dependencies
run: yarn --frozen-lockfile --network-concurrency 1

- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly

- name: Build Docs
run: yarn docs:build

- name: Create book folder
run: mdbook build docs

- uses: amondnet/vercel-action@v25
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }} # Required
vercel-org-id: ${{ secrets.ORG_ID}} #Required
scope: ${{ secrets.ORG_ID}} #Required
vercel-args: ${{ github.ref_name == 'main' && '--prod' || '' }}
vercel-project-id: ${{ secrets.PROJECT_ID}} #Required
working-directory: ./docs/book

0 comments on commit 76c3bcc

Please sign in to comment.