diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4f0a212..4705280 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,22 +15,7 @@ name: "CI" -on: - push: - paths: - - '.github/actions/**' - - '.github/workflows/ci.yml' - - 'src/ensembl/**' - - 'tests/**' - - 'pyproject.toml' - - pull_request: - paths: - - '.github/actions/**' - - '.github/workflows/ci.yml' - - 'src/ensembl/**' - - 'tests/**' - - 'pyproject.toml' +on: [push, pull_request] permissions: write-all @@ -109,12 +94,16 @@ jobs: message: ${{ steps.coverage_report.outputs.coverage }} color: ${{ steps.coverage_report.outputs.color }} - - name: Deploy coverage report to GitHub pages + - name: Build documentation + if: ${{ github.event_name == 'push' && github.ref_name == 'main' }} + run: | + mkdocs build + + - name: Deploy documentation to GitHub Pages if: ${{ github.event_name == 'push' && github.ref_name == 'main' }} uses: peaceiris/actions-gh-pages@v4 with: publish_branch: mkdocs github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./reports/htmlcov - destination_dir: ./site/coverage + publish_dir: ./site force_orphan: true \ No newline at end of file diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml deleted file mode 100644 index 4c2940f..0000000 --- a/.github/workflows/docs.yml +++ /dev/null @@ -1,52 +0,0 @@ -# See the NOTICE file distributed with this work for additional information -# regarding copyright ownership. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: Docs - -on: - push: - branches: - - main - paths: - - '.github/actions/**' - - '.github/workflows/docs.yml' - - 'docs/**' - - 'src/ensembl/**' - - 'mkdocs.yml' - -permissions: - contents: write - -jobs: - mkdocs: - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.9"] - - steps: - - uses: actions/checkout@v4 - - uses: ./.github/actions/python_build - - - name: Build documentation - run: | - mkdocs build - - - name: Deploy documentation to GitHub Pages - uses: peaceiris/actions-gh-pages@v4 - with: - publish_branch: mkdocs - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./site - force_orphan: true diff --git a/README.md b/README.md index 3d92e51..54424cd 100644 --- a/README.md +++ b/README.md @@ -3,10 +3,11 @@ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg)](https://github.com/Ensembl/ensembl-utils/blob/main/LICENSE) [![Coverage](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/JAlvarezJarreta/019787fcdec96f05d6c53367bbf2b949/raw/ensembl-utils_badge.json)](https://ensembl.github.io/ensembl-utils/coverage) [![CI](https://github.com/Ensembl/ensembl-utils/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/Ensembl/ensembl-utils/actions/workflows/ci.yml) -[![Docs](https://github.com/Ensembl/ensembl-utils/actions/workflows/docs.yml/badge.svg?branch=main)](https://ensembl.github.io/ensembl-utils/) Centralise generic Python utils used by other project within Ensembl design to facilitate frequent tasks such as input file path checks, archive files IO manipulation or logging setup, among others. +For more information, please consult this repository's [GitHub pages](https://ensembl.github.io/ensembl-utils/). + ## Getting Started ### Basic installation diff --git a/mkdocs.yml b/mkdocs.yml index 9f117e4..bf812ea 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -59,7 +59,7 @@ plugins: show_symbol_type_toc: true - coverage: page_name: coverage - html_report_dir: htmlcov + html_report_dir: ./reports/htmlcov nav: - Home: index.md