From d9da45cc07d484f510a02f7ff3e01e59ceee3921 Mon Sep 17 00:00:00 2001 From: Kor Nielsen Date: Thu, 2 Mar 2023 22:39:13 -0800 Subject: [PATCH] Add a GitHub workflow to autogenerate the register docs. --- .github/workflows/doc-gen.yml | 61 +++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) create mode 100644 .github/workflows/doc-gen.yml diff --git a/.github/workflows/doc-gen.yml b/.github/workflows/doc-gen.yml new file mode 100644 index 000000000..5b021f0e3 --- /dev/null +++ b/.github/workflows/doc-gen.yml @@ -0,0 +1,61 @@ +# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions + +name: Build Register Documentation + +on: + workflow_dispatch: + pull_request: + +jobs: + build: + name: Build reigster documentation and upload artifact + + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v3 + + - name: Install peakrd-uvm + run: | + python3 -m pip install \ + peakrdl-uvm==2.2.0 \ + peakrdl-regblock==0.10.0 \ + peakrdl-html==2.9.0 \ + peakrdl-ipxact==3.3.0 + + - name: Generate docs + run: | + echo Running script + tools/scripts/reg_doc_gen.sh + + - name: Stage documents + run: | + mkdir -p /tmp/pages-docs/0.8 + cp -R src/integration/docs/caliptra_reg_html /tmp/pages-docs/0.8/internal-regs + cp -R src/soc_ifc/docs/caliptra_top_reg_html /tmp/pages-docs/0.8/external-regs + find /tmp/pages-docs + + - name: Generate GitHub Pages artifacts + uses: actions/upload-pages-artifact@v1 + with: + path: /tmp/pages-docs + +# Uncomment once this workflow is on a branch that is allowed to run under the github-pages environment +# +# deploy: +# name: Deploy artifacts to GitHub Pages +# needs: build +# +# permissions: +# pages: write +# id-token: write +# +# environment: +# - name: github-pages +# url: {{ steps.deployment.outputs.page_url }} +# +# runs-on: ubuntu-22.04 +# steps: +# - name: Deploy to GitHub Pages +# id: deployment +# uses: actions/deploy-pages@v1