diff --git a/.github/workflows/build_mkdocs.yml b/.github/workflows/build_mkdocs.yml index fadb7141..c2d57c32 100644 --- a/.github/workflows/build_mkdocs.yml +++ b/.github/workflows/build_mkdocs.yml @@ -1,7 +1,12 @@ -name: Deploy MkDocs to GitHub Pages +name: Build and deploy MkDocs to GitHub Pages on: + pull_request: + # Test build for PRs targeting default branch + branches: + - native push: + # Deploy on push to default branch branches: - native @@ -9,7 +14,7 @@ permissions: contents: write jobs: - deploy: + build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 @@ -20,5 +25,13 @@ jobs: run: | python -m pip install --upgrade pip pip install -r docs/requirements.txt - - name: Build and deploy MkDocs + + - name: Build MkDocs site (strict) + # Test build on PR to native branch + if: github.event_name == 'pull_request' + run: mkdocs build --strict + + - name: Deploy to GitHub Pages + # Deploy on push to native branch + if: github.event_name == 'push' && github.ref == 'refs/heads/native' run: mkdocs gh-deploy --force diff --git a/docs/contributing.md b/docs/CONTRIBUTING.md similarity index 100% rename from docs/contributing.md rename to docs/CONTRIBUTING.md diff --git a/docs/modules/consensus.md b/docs/modules/consensus.md new file mode 120000 index 00000000..4083628c --- /dev/null +++ b/docs/modules/consensus.md @@ -0,0 +1 @@ +../../consensus/README.md \ No newline at end of file diff --git a/docs/modules/index.md b/docs/modules/index.md index e666ad68..4901e3bc 100644 --- a/docs/modules/index.md +++ b/docs/modules/index.md @@ -5,9 +5,10 @@ The Spacehack 2.0 workflow consists of multiple module types: - [Datasets](data.md) to analyze - [Methods](method.md) to identify spatial doamins - [Metrics](metric.md) to evaluate performance against a groundtruth +- [Consensus](consensus.md) to build a consensus clustering across multiple methods If you want to generate a new module you have to make sure to follow the format and specification as defined in their respective sections. -Also, it might be worth having a look at the [Contribution guide](../contributing.md). +Also, it might be worth having a look at the [Contribution guide](../CONTRIBUTING.md). ![Workflow](../img/workflow.svg) diff --git a/mkdocs.yml b/mkdocs.yml index 9fae23ac..9ee7bcf3 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -11,7 +11,8 @@ nav: - Data: modules/data.md - Method: modules/method.md - Metric: modules/metric.md - - Extending & Contributing: contributing.md + - Consensus: modules/consensus.md + - Extending & Contributing: CONTRIBUTING.md - About: - SpaceHack: https://spatialhackathon.github.io/ - Repository: https://github.com/SpatialHackathon/SACCELERATOR