diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index faaf624fcb..8fc49afb4f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -80,3 +80,39 @@ jobs: script: | cd monitoring/prober make test + + publish-gh-pages: + name: Publish GitHub Pages + needs: [hygiene-tests, monitorlib-test, mock_uss-test, uss_qualifier-test, uss_qualifier_F3411-19-test, prober-test] + if: ${{ always() && contains(join(needs.*.result, ','), 'success') }} + runs-on: ubuntu-latest + permissions: + contents: write + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + submodules: true + path: monitoring + + - name: Get uss_qualifier reports + uses: actions/download-artifact@v3 + with: + name: monitoring-test-uss_qualifier-reports + path: ./artifacts + + - name: Make site content + run: ./monitoring/github_pages/make_site_content.sh + + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/main' + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public + enable_jekyll: true + user_name: 'github-actions[bot]' + user_email: 'github-actions[bot]@users.noreply.github.com' + commit_message: ${{ github.event.head_commit.message }} diff --git a/github_pages/README.md b/github_pages/README.md new file mode 100644 index 0000000000..b61c041f0a --- /dev/null +++ b/github_pages/README.md @@ -0,0 +1,3 @@ +# GitHub Pages tools + +This folder contains tools to publish content to [this repository's GitHub Pages site](https://interuss.github.io/monitoring/). Publishing is performed by [the CI](../.github/workflows/ci.yml) at appropriate times, generally when a PR is merged to the main branch. Current site content is pushed to the gh-pages branch of this repository upon publishing, and then that content is deployed to the site by GitHub. diff --git a/github_pages/make_site_content.sh b/github_pages/make_site_content.sh new file mode 100755 index 0000000000..bbb1f1f8c2 --- /dev/null +++ b/github_pages/make_site_content.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +# This script generates the content for this repository's GitHub Pages site. It is invoked by the CI and expects the +# working folder to contain: +# ./monitoring: this repository +# ./artifacts/uss_qualifier/reports: Reports generated by from running uss_qualifier +# +# The content placed into ./public by this script will be published to the GitHub Pages site. + +mkdir ./public +cp -r ./monitoring/github_pages/static/* ./public + +mkdir -p ./public/artifacts/uss_qualifier/reports +cp -r ./artifacts/uss_qualifier/output/sequence_uspace ./public/artifacts/uss_qualifier/reports/sequence_uspace +cp -r ./artifacts/uss_qualifier/output/tested_requirements_uspace ./public/artifacts/uss_qualifier/reports/tested_requirements_uspace +cp -r ./artifacts/uss_qualifier/output/capabilities_uspace.html ./public/artifacts/uss_qualifier/reports/capabilities_uspace.html diff --git a/github_pages/static/index.md b/github_pages/static/index.md new file mode 100644 index 0000000000..25a167a753 --- /dev/null +++ b/github_pages/static/index.md @@ -0,0 +1,13 @@ +# InterUSS [`monitoring`](https://github.com/interuss/monitoring) generated content + +This site contains content automatically generated by actions in the [InterUSS](https://interussplatform.org) [monitoring repository](https://github.com/interuss/monitoring). + +## uss_qualifier [reports](https://github.com/interuss/monitoring/tree/main/monitoring/uss_qualifier/reports) + +These reports were generated during continuous integration for the most recent PR merged to the main branch. + +### [U-space developer](https://github.com/interuss/monitoring/blob/main/monitoring/uss_qualifier/configurations/dev/uspace.yaml) [test configuration](https://github.com/interuss/monitoring/tree/main/monitoring/uss_qualifier/configurations) + +* [Sequence view](./artifacts/uss_qualifier/reports/sequence_uspace) +* [Tested requirements](./artifacts/uss_qualifier/tested_requirements_uspace) +* [Demonstrated capabilities](./artifacts/uss_qualifier/capabilities_uspace.html) diff --git a/test/repo_hygiene/md_files/md_files.py b/test/repo_hygiene/md_files/md_files.py index d9bfceb267..5b0b13e5e1 100644 --- a/test/repo_hygiene/md_files/md_files.py +++ b/test/repo_hygiene/md_files/md_files.py @@ -15,5 +15,5 @@ def check_md_file(md_file_path: str, repo_root: str) -> None: def check_md_files(path: str, repo_root: str) -> None: for md_file in glob.glob(os.path.join(path, "*.md")): check_md_file(md_file, repo_root) - for subfolder in (f.path for f in os.scandir(path) if f.is_dir()): + for subfolder in (f.path for f in os.scandir(path) if f.is_dir() and f.name != "github_pages"): check_md_files(subfolder, repo_root)