Skip to content

Build llm-d website #433

Build llm-d website

Build llm-d website #433

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: Build llm-d website
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: [ "main" ]
# Runs every night at midnight UTC
schedule:
- cron: '0 0 * * *'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
name: Build llm-d website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: actions/setup-node@v6
with:
node-version: 20.18.1
cache: npm
- name: Install dependencies
run: npm install
- name: Build website
run: npm run build
- name: Sync preview docs from llm-d/llm-d
run: cd preview && bash scripts/sync-docs.sh main
- name: Install preview docs dependencies
run: cd preview && npm install
- name: Build preview docs
run: cd preview && npm run build
- name: Merge preview into main build
run: cp -r preview/build build/preview
- name: Upload Build Artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
include-hidden-files: true
path: build
deploy:
name: Deploy to GitHub Pages
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0