Skip to content

SWE-agent takes a GitHub issue and tries to automatically fix it, using your LM of choice. It can also be employed for offensive cybersecurity or competitive coding challenges. [NeurIPS 2024]

Docs/CI: Fix docs build & run for PRs (#461)

Kilian Lieret9ee0794b1f72
diff --git a/.github/workflows/build-docs.yaml b/.github/workflows/build-docs.yaml
index 9e2fc074..d28205f7 100644
--- a/.github/workflows/build-docs.yaml
+++ b/.github/workflows/build-docs.yaml
@@ -4,6 +4,10 @@ on:
push:
branches:
- main
+ - "build-docs-*"
+ pull_request:
+ branches:
+ - main
permissions:
contents: write
jobs:
@@ -30,6 +34,10 @@ jobs:
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
- - run: uv pip install --python ${Python_ROOT_DIR} mkdocs-material mkdocs-glightbox mkdocs-include-markdown-plugin 'mkdocstrings[python]>=0.18'
- - run: mkdocs gh-deploy --force
-
+ - run: uv pip install --python ${Python_ROOT_DIR} '.[dev]'
+ - name: Build Documentation
+ if: github.ref != 'refs/heads/main'
+ run: mkdocs gh-deploy --force
+ - name: Build + Deploy Documentation
+ if: github.ref == 'refs/heads/main'
+ run: mkdocs gh-deploy --force
diff --git a/docs/dev/contribute.md b/docs/dev/contribute.md
index 2c1c8bf2..e3297cdb 100644
--- a/docs/dev/contribute.md
+++ b/docs/dev/contribute.md
@@ -93,6 +93,6 @@ and point your browser to port 8000 or click one of the links in the output.
Read the reference for more information on our code.
- [:octicons-arrow-right-24: Read more](reference/index.md)
+ [:octicons-arrow-right-24: Read more](../reference/index.md)
</div>
diff --git a/mkdocs.yml b/mkdocs.yml
index 86f2ea61..e8032926 100644
--- a/mkdocs.yml
+++ b/mkdocs.yml
@@ -63,7 +63,7 @@ nav:
- "Using the web UI": "usage/web_ui.md"
- "Trajectories": "usage/trajectories.md"
- "Trajectory inspector": "usage/inspector.md"
- - "FAQ": "usage/faq.md"
+ - "FAQ": "usage/usage_faq.md"
- "Benchmarking": "usage/benchmarking.md"
- Configuration:
- "Config files": "config/config.md"
@@ -91,4 +91,4 @@ plugins:
paths: [sweagent]
repo_url: https://github.com/princeton-nlp/SWE-agent
repo_name: princeton-nlp/SWE-agent
-edit_uri: edit/main/docs/
\ No newline at end of file
+edit_uri: edit/main/docs/