mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-17 21:25:46 +02:00
Reverts langchain-ai/langgraph#6301 This adds redirects back
73 lines
1.8 KiB
YAML
73 lines
1.8 KiB
YAML
name: Deploy Docs Redirects
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: false
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: docs
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 10 # Job will be cancelled if it runs for more than 10 minutes
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.MKDOCS_GITHUB_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v5
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: astral-sh/setup-uv@v7
|
|
with:
|
|
python-version: "3.12"
|
|
enable-cache: true
|
|
cache-suffix: "docs"
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
yarn
|
|
uv sync --all-groups
|
|
# we run this installation only for internal PRs
|
|
# as GITHUB_TOKEN is not available for PRs from outside contributors
|
|
if [ -n "${GITHUB_TOKEN}" ]; then
|
|
uv run pip install "git+https://${GITHUB_TOKEN}@github.com/langchain-ai/mkdocs-material-insiders.git"
|
|
fi
|
|
|
|
- name: Build llms-text
|
|
run: make llms-text
|
|
|
|
- name: Build site (redirects only)
|
|
run: make build-docs
|
|
env:
|
|
OPENAI_API_KEY: sf-proj-1234567890 # fake placeholder, shouldn't actually be used
|
|
ANTHROPIC_API_KEY: sk-ant-api03-1234567890 # fake placeholder, shouldn't actually be used
|
|
|
|
- name: Configure GitHub Pages
|
|
if: github.ref == 'refs/heads/main'
|
|
uses: actions/configure-pages@v5
|
|
|
|
- name: Upload Pages Artifact
|
|
if: github.ref == 'refs/heads/main'
|
|
uses: actions/upload-pages-artifact@v4
|
|
with:
|
|
path: ./docs/site/
|
|
|
|
- name: Deploy to GitHub Pages
|
|
if: github.ref == 'refs/heads/main'
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|