Reorganizing docs runner and setting archive subdir for old docs

Signed-off-by: coleramos425 <colramos@amd.com>
This commit is contained in:
coleramos425
2024-04-01 14:03:50 -05:00
committato da Cole Ramos
parent 9c93449cc7
commit aac471c0fa
175 ha cambiato i file con 8 aggiunte e 8 eliminazioni
+64
Vedi File
@@ -0,0 +1,64 @@
name: Documentation 2.x
on:
push:
branches: ["main"]
paths:
- 'src/docs-2.x'
- 'src/archive/docs-1.x'
- '.github/workflows/docs.yml'
- 'VERSION'
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
# Build job
build:
runs-on: ubuntu-latest
container:
image: sphinxdoc/sphinx
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Additional python packages
run: pip3 install -r requirements-doc.txt
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build 1.x docs
run: |
cd src/archive/docs-1.x
make html
- name: Build current docs
run: |
cd src/docs
make html
- name: Relocate 1.x docs
run: |
mv src/archive/docs-1.x/_build/html src/docs/_build/html/1.x
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./src/docs/_build/html
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4