mirror of
https://github.com/langchain-ai/langgraph.git
synced 2026-08-20 06:35:46 +02:00
Bumps [actions/upload-pages-artifact](https://github.com/actions/upload-pages-artifact) from 3 to 4. <details> <summary>Release notes</summary> <p><em>Sourced from <a href="https://github.com/actions/upload-pages-artifact/releases">actions/upload-pages-artifact's releases</a>.</em></p> <blockquote> <h2>v4.0.0</h2> <h2>What's Changed</h2> <ul> <li>Potentially breaking change: hidden files (specifically dotfiles) will not be included in the artifact by <a href="https://github.com/tsusdere"><code>@tsusdere</code></a> in <a href="https://redirect.github.com/actions/upload-pages-artifact/pull/102">actions/upload-pages-artifact#102</a> If you need to include dotfiles in your artifact: instead of using this action, create your own artifact according to these requirements <a href="https://github.com/actions/upload-pages-artifact?tab=readme-ov-file#artifact-validation">https://github.com/actions/upload-pages-artifact?tab=readme-ov-file#artifact-validation</a></li> <li>Pin <code>actions/upload-artifact</code> to SHA by <a href="https://github.com/heavymachinery"><code>@heavymachinery</code></a> in <a href="https://redirect.github.com/actions/upload-pages-artifact/pull/127">actions/upload-pages-artifact#127</a></li> </ul> <p><strong>Full Changelog</strong>: <a href="https://github.com/actions/upload-pages-artifact/compare/v3.0.1...v4.0.0">https://github.com/actions/upload-pages-artifact/compare/v3.0.1...v4.0.0</a></p> <h2>v3.0.1</h2> <h1>Changelog</h1> <ul> <li>Group tar's output to prevent it from messing up action logs <a href="https://github.com/SilverRainZ"><code>@SilverRainZ</code></a> (<a href="https://redirect.github.com/actions/upload-pages-artifact/issues/94">#94</a>)</li> <li>Update README.md <a href="https://github.com/uiolee"><code>@uiolee</code></a> (<a href="https://redirect.github.com/actions/upload-pages-artifact/issues/88">#88</a>)</li> <li>Bump the non-breaking-changes group with 1 update <a href="https://github.com/dependabot"><code>@dependabot</code></a> (<a href="https://redirect.github.com/actions/upload-pages-artifact/issues/92">#92</a>)</li> <li>Update Dependabot config to group non-breaking changes <a href="https://github.com/JamesMGreene"><code>@JamesMGreene</code></a> (<a href="https://redirect.github.com/actions/upload-pages-artifact/issues/91">#91</a>)</li> <li>Bump actions/checkout from 3 to 4 <a href="https://github.com/dependabot"><code>@dependabot</code></a> (<a href="https://redirect.github.com/actions/upload-pages-artifact/issues/76">#76</a>)</li> </ul> <p>See details of <a href="https://github.com/actions/upload-pages-artifact/compare/v3.0.0...v3.0.1">all code changes</a> since previous release.</p> </blockquote> </details> <details> <summary>Commits</summary> <ul> <li><a href="https://github.com/actions/upload-pages-artifact/commit/7b1f4a764d45c48632c6b24a0339c27f5614fb0b"><code>7b1f4a7</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-pages-artifact/issues/127">#127</a> from heavymachinery/pin-sha</li> <li><a href="https://github.com/actions/upload-pages-artifact/commit/4cc19c7d3f3e6c87c68366501382a03c8b1ba6db"><code>4cc19c7</code></a> Pin <code>actions/upload-artifact</code> to SHA</li> <li><a href="https://github.com/actions/upload-pages-artifact/commit/2d163be3ddce01512f3eea7ac5b7023b5d643ce1"><code>2d163be</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-pages-artifact/issues/107">#107</a> from KittyChiu/main</li> <li><a href="https://github.com/actions/upload-pages-artifact/commit/c70484322b1c476728dcd37fac23c4dea2a0c51a"><code>c704843</code></a> fix: linted README</li> <li><a href="https://github.com/actions/upload-pages-artifact/commit/9605915f1d2fc79418cdce4d5fbe80511c457655"><code>9605915</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-pages-artifact/issues/106">#106</a> from KittyChiu/kittychiu/update-readme-1</li> <li><a href="https://github.com/actions/upload-pages-artifact/commit/e59cdfe6d6b061aab8f0619e759cded914f3ab03"><code>e59cdfe</code></a> Update README.md</li> <li><a href="https://github.com/actions/upload-pages-artifact/commit/a2d67043267d885050434d297d3dd3a3a14fd899"><code>a2d6704</code></a> doc: updated usage section in readme</li> <li><a href="https://github.com/actions/upload-pages-artifact/commit/984864e7b70fb5cb764344dc9c4b5c087662ef50"><code>984864e</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-pages-artifact/issues/105">#105</a> from actions/Jcambass-patch-1</li> <li><a href="https://github.com/actions/upload-pages-artifact/commit/45dc78884ca148c05eddcd8ac0a804d3365e9014"><code>45dc788</code></a> Add workflow file for publishing releases to immutable action package</li> <li><a href="https://github.com/actions/upload-pages-artifact/commit/efaad07812d4b9ad2e8667cd46426fdfb7c22e22"><code>efaad07</code></a> Merge pull request <a href="https://redirect.github.com/actions/upload-pages-artifact/issues/102">#102</a> from actions/hidden-files</li> <li>Additional commits viewable in <a href="https://github.com/actions/upload-pages-artifact/compare/v3...v4">compare view</a></li> </ul> </details> <br /> [](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores) Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`. [//]: # (dependabot-automerge-start) [//]: # (dependabot-automerge-end) --- <details> <summary>Dependabot commands and options</summary> <br /> You can trigger Dependabot actions by commenting on this PR: - `@dependabot rebase` will rebase this PR - `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it - `@dependabot merge` will merge this PR after your CI passes on it - `@dependabot squash and merge` will squash and merge this PR after your CI passes on it - `@dependabot cancel merge` will cancel a previously requested merge and block automerging - `@dependabot reopen` will reopen this PR if it is closed - `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually - `@dependabot show <dependency name> ignore conditions` will show all of the ignore conditions of the specified dependency - `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) - `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) </details> Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Sydney Runkle <54324534+sydney-runkle@users.noreply.github.com>
151 lines
5.6 KiB
YAML
151 lines
5.6 KiB
YAML
name: Deploy Docs
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
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:
|
|
get-changed-files:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
changed-files: ${{ steps.changed-files.outputs.added_modified }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Get changed files
|
|
id: changed-files
|
|
uses: Ana06/get-changed-files@v2.3.0
|
|
with:
|
|
filter: "docs/docs/**"
|
|
|
|
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@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Python
|
|
uses: astral-sh/setup-uv@v6
|
|
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: Run unit tests
|
|
# Run unit tests on the docs build pipeline
|
|
run: make tests
|
|
- name: Lint Docs
|
|
# This step lints the docs using the existing linting set up.
|
|
# It should be very fast and should not require any external services.
|
|
run: make lint-docs
|
|
- name: Build llms-text
|
|
run: make llms-text
|
|
- name: Build site
|
|
run: |
|
|
# If this is main branch, then we want to download stats. we do this
|
|
# with the env variable DOWNLOAD_STATS=true
|
|
if [ "${{ github.ref }}" == "refs/heads/main" ]; then
|
|
DOWNLOAD_STATS=true make build-docs
|
|
else
|
|
make build-docs
|
|
fi
|
|
env:
|
|
MKDOCS_GIT_COMMITTERS_APIKEY: ${{ secrets.MKDOCS_GIT_COMMITTERS_APIKEY }}
|
|
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: Check links in notebooks
|
|
env:
|
|
LANGCHAIN_API_KEY: test
|
|
if: github.event_name == 'schedule'
|
|
run: |
|
|
if [ "${{ github.event_name }}" == "schedule" ]; then
|
|
echo "Running link check on all HTML files matching notebooks in docs directory..."
|
|
uv run pytest -v \
|
|
--check-links-ignore "https://(api|web|docs)\.smith\.langchain\.com/.*" \
|
|
--check-links-ignore "https://academy\.langchain\.com/.*" \
|
|
--check-links-ignore "https://x.com/.*" \
|
|
--check-links-ignore "https://twitter.com/.*" \
|
|
--check-links-ignore "https://github\.com/.*" \
|
|
--check-links-ignore "http://localhost:8123/.*" \
|
|
--check-links-ignore "http://localhost:2024.*" \
|
|
--check-links-ignore "http://127.0.0.1:.*" \
|
|
--check-links-ignore "/.*\.(ipynb|html)$" \
|
|
--check-links-ignore "https://python\.langchain\.com/.*" \
|
|
--check-links-ignore "https://openai\.com/.*" \
|
|
--check-links-ignore "https://www\.uber\.com/.*" \
|
|
--check-links-ignore "https://pepy\.tech/.*" \
|
|
--check-links-ignore "docs/docs/static/wordmark_*" \
|
|
--check-links $(find site -name "index.html" | grep -v 'storm/index.html')
|
|
|
|
else
|
|
echo "Fetching changes from origin/main..."
|
|
git fetch origin main
|
|
echo "Checking for changed notebook files..."
|
|
CHANGED_FILES=$(git diff --name-only --diff-filter=d origin/main | grep 'docs/docs/.*\.ipynb$' | grep -v 'storm.ipynb' | sed -E 's|^docs/docs/|site/|; s/\.ipynb$/\/index.html/' || true)
|
|
echo "Changed files: ${CHANGED_FILES}"
|
|
if [ -n "${CHANGED_FILES}" ]; then
|
|
echo "Running link check on HTML files matching changed notebook files..."
|
|
uv run pytest -v \
|
|
--check-links-ignore "https://(api|web|docs)\.smith\.langchain\.com/.*" \
|
|
--check-links-ignore "https://academy\.langchain\.com/.*" \
|
|
--check-links-ignore "http://localhost:8123/.*" \
|
|
--check-links-ignore "http://localhost:2024.*" \
|
|
--check-links-ignore "http://127.0.0.1:.*" \
|
|
--check-links-ignore "https://x.com/.*" \
|
|
--check-links-ignore "https://twitter.com/.*" \
|
|
--check-links-ignore "https://github\.com/.*" \
|
|
--check-links-ignore "/.*\.(ipynb|html)$" \
|
|
--check-links-ignore "docs/docs/static/wordmark_*" \
|
|
--check-links ${CHANGED_FILES} \
|
|
|| ([ $? = 5 ] && exit 0 || exit $?)
|
|
else
|
|
echo "No notebook files changed."
|
|
fi
|
|
fi
|
|
|
|
- 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
|