mirror of https://github.com/microsoft/autogen.git
Publish both 0.2 and dev websites
This commit is contained in:
parent
4ea1f7a8b3
commit
5cb5bda522
|
@ -22,10 +22,7 @@ concurrency:
|
|||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
build-04:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -40,16 +37,99 @@ jobs:
|
|||
uv sync --locked
|
||||
source .venv/bin/activate
|
||||
poe --directory ./packages/autogen-core docs-build
|
||||
mkdir -p docs-staging/dev
|
||||
mv ./packages/autogen-core/docs/build/* docs-staging/dev/
|
||||
mkdir -p docs-staging/autogen/dev/
|
||||
mv ./packages/autogen-core/docs/build/* docs-staging/autogen/dev/
|
||||
working-directory: ./python
|
||||
- name: generate redirects
|
||||
run: |
|
||||
python python/packages/autogen-core/docs/redirects/redirects.py python/docs-staging
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: "./python/docs-staging"
|
||||
name: "04-docs"
|
||||
|
||||
build-02:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
defaults:
|
||||
run:
|
||||
working-directory: website
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
lfs: true
|
||||
repository: "microsoft/autogen"
|
||||
# ref: "0.2"
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 18.x
|
||||
- name: setup python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.8"
|
||||
- name: pydoc-markdown install
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install pydoc-markdown pyyaml termcolor
|
||||
# Pin databind packages as version 4.5.0 is not compatible with pydoc-markdown.
|
||||
pip install databind.core==4.4.2 databind.json==4.4.2
|
||||
- name: pydoc-markdown run
|
||||
run: |
|
||||
pydoc-markdown
|
||||
- name: quarto install
|
||||
working-directory: ${{ runner.temp }}
|
||||
run: |
|
||||
wget -q https://github.com/quarto-dev/quarto-cli/releases/download/v1.5.23/quarto-1.5.23-linux-amd64.tar.gz
|
||||
tar -xzf quarto-1.5.23-linux-amd64.tar.gz
|
||||
echo "$(pwd)/quarto-1.5.23/bin/" >> $GITHUB_PATH
|
||||
- name: Process notebooks
|
||||
run: |
|
||||
python process_notebooks.py render
|
||||
- name: Build website
|
||||
run: |
|
||||
if [ -e yarn.lock ]; then
|
||||
yarn install --frozen-lockfile --ignore-engines
|
||||
yarn build
|
||||
elif [ -e package-lock.json ]; then
|
||||
npm ci
|
||||
npm run build
|
||||
else
|
||||
npm i --legacy-peer-deps
|
||||
npm run build
|
||||
fi
|
||||
|
||||
- run: |
|
||||
mkdir -p artifact/autogen/0.2/
|
||||
cp -r build/* artifact/autogen/0.2/
|
||||
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
path: "website/artifact"
|
||||
name: "02-docs"
|
||||
|
||||
deploy:
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: [build-02, build-04]
|
||||
steps:
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
path: artifacts
|
||||
|
||||
- name: Copy 02-docs
|
||||
run: |
|
||||
mkdir -p deploy/
|
||||
cp -r artifacts/02-docs/* deploy/
|
||||
cp -r artifacts/04-docs/* deploy/
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: "./python/docs-staging"
|
||||
path: "./deploy"
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
uses: actions/deploy-pages@v4
|
||||
|
|
|
@ -37,7 +37,7 @@ def main():
|
|||
sys.exit(1)
|
||||
|
||||
base_dir = Path(sys.argv[1])
|
||||
generate_redirect("/", "/0.2/", base_dir)
|
||||
generate_redirect("/autogen/", "/autogen/0.2/", base_dir)
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
|
@ -59,7 +59,7 @@ myst_enable_extensions = [
|
|||
"strikethrough",
|
||||
]
|
||||
|
||||
html_baseurl = "/dev/"
|
||||
html_baseurl = "/autogen/dev/"
|
||||
|
||||
# -- Options for HTML output -------------------------------------------------
|
||||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
||||
|
|
Loading…
Reference in New Issue