Add docs.yml #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Bulid Documentation | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout ${{ github.repository }} | |
uses: actions/checkout@v4 | |
- name: Set Up uv | |
uses: astral-sh/setup-uv@v3 | |
with: | |
enable-cache: true | |
- name: Install Python | |
run: uv install python | |
- name: Install Dependencies | |
run: uv sync --only-group docs | |
- name: Build Documentation | |
run: uv run icl install && uv run mkdocs build | |
- name: Upload Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: site | |
path: site | |
deploy: | |
name: Deploy Documentation | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Artifact | |
uses: actions/download-artifact@v3 | |
with: | |
name: site | |
path: site | |
- name: Deploy to Vercel | |
run: npx vercel --token ${{ secrets.VERCEL_TOKEN }} --yes --prod | |
working-directory: site | |
env: | |
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | |
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }} |