From 49d2aec76dcefb926ede7f05e0b2d646d49cd3a7 Mon Sep 17 00:00:00 2001 From: Brian Sipos Date: Thu, 25 Jul 2024 16:44:09 -0400 Subject: [PATCH] Fix submodules and CI jobs (#10) * Repointing submodule * Updating codeql checks * Updating docs job to deploy to pages --- .github/workflows/codeql.yml | 4 +-- .github/workflows/docs.yaml | 62 ++++++++++++++++++++++++++++++++---- .gitmodules | 2 +- 3 files changed, 59 insertions(+), 9 deletions(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 668e964..b1ddeff 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -13,9 +13,9 @@ name: "CodeQL" on: push: - branches: [ "main" ] + branches: [ "main", "apl*" ] pull_request: - branches: [ "main" ] + branches: [ "main", "apl*" ] schedule: - cron: '40 12 * * 1' diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml index d5f4bd6..8d38ec9 100644 --- a/.github/workflows/docs.yaml +++ b/.github/workflows/docs.yaml @@ -20,15 +20,37 @@ ## subcontract 1658085. ## -name: Build documentation +name: API documentation -on: [push] +on: + push: + paths: + - .github/workflows/docs.yaml + - deps/** + - src/** + - tests/** + - docs/** + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false jobs: - build: + apidoc: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - name: Checkout repository + uses: actions/checkout@v3 + with: + submodules: recursive - name: dependencies run: | sudo apt-get update && sudo apt-get install -y python3-pip @@ -36,7 +58,35 @@ jobs: pip3 install .[docs] - name: build run: ./build_docs.sh - - uses: actions/upload-artifact@v3 + - name: Compress + run: cd docs/_build && tar -cf html.tar html + - name: Archive + uses: actions/upload-artifact@v3 with: name: docs - path: docs/_build + path: docs/_build/html.tar + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + needs: apidoc + if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/apl-fy24' }} + runs-on: ubuntu-latest + steps: + - uses: actions/download-artifact@v3 + with: + name: doxygen + path: docs/_build/ + - name: Decompress + run: cd docs/_build && tar -xf html.tar + - name: Setup Pages + uses: actions/configure-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v2 + with: + # Just the HTML + path: docs/_build/html/ + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2 diff --git a/.gitmodules b/.gitmodules index 73207ed..e346761 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +1,4 @@ [submodule "tests/adms"] path = tests/adms - url = ../anms-adms.git + url = ../dtnma-adms.git branch = main