Files
rocm-systems/.github/workflows/docs.yml
T
David Galiffi 7c7705d2ba Remove dev and main branch from workflows. (#404)
* Remove `dev` and `main` branch from workflows.

Update links in documentation.

Signed-off-by: David Galiffi <David.Galiffi@amd.com>

* `amd-staging` -> `amd-mainline` in docs

Signed-off-by: Peter Jun Park <peter.park@amd.com>

---------

Signed-off-by: David Galiffi <David.Galiffi@amd.com>
Signed-off-by: Peter Jun Park <peter.park@amd.com>
Co-authored-by: Peter Jun Park <peter.park@amd.com>
2024-09-27 16:16:21 -05:00

64 строки
1.4 KiB
YAML

name: Documentation
on:
push:
branches: [ amd-mainline ]
paths:
- 'docs/archive/docs-2.x/**'
- 'docs/archive/docs-1.x/**'
- '.github/workflows/docs.yml'
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 docs/archive/requirements-doc.txt
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build 1.x docs
run: |
cd docs/archive/docs-1.x
make html
- name: Build 2.x docs
run: |
cd docs/archive/docs-2.x
make html
- name: Relocate 1.x docs
run: |
mv docs/archive/docs-1.x/_build/html docs/archive/_build/html/1.x
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/archive/_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