From c738b8577a0452f7ccca768f4ea3c5cd90ad865d Mon Sep 17 00:00:00 2001 From: Niels Claes Date: Wed, 22 Sep 2021 16:16:34 +0200 Subject: [PATCH] updated docs .yml --- .github/workflows/docs.yml | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 591aa373d..0ab364d22 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,12 +2,25 @@ name: docs on: push: - branches: [ docs/devdocs ] + branches: [ master, develop ] + pull_request: + branches: [ master, develop] jobs: - develop: + doc: + if: github.ref == 'refs/heads/master' || github.base_ref == 'refs/heads/master' || github.ref == 'refs/heads/develop' || github.base_ref == 'refs/heads/develop' + name: '${{ matrix.name }}' runs-on: ubuntu-latest + strategy: + fail-fast: true + matrix: + include: + - name: develop + branchname: develop + repository: n-claes/legolas.science-dev + cname: dev.legolas.science + steps: - uses: actions/checkout@v2 - name: Set up Python 3.8 @@ -15,7 +28,7 @@ jobs: with: python-version: 3.8 - - name: Install build dependencies + - name: Install dependencies run: | python -m pip install --upgrade pip pip install ford graphviz @@ -26,15 +39,16 @@ jobs: - name: Generate documentation run: | cd docs - python generate_docs.py develop + python generate_docs.py ${{ matrix.name }} - name: Deploy uses: peaceiris/actions-gh-pages@v3 + if: github.ref == 'refs/heads/${{ matrix.branchname }}' with: deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY }} - external_repository: n-claes/legolas.science-dev + external_repository: ${{ matrix.repository }} publish_branch: main publish_dir: ./docs - cname: dev.legolas.science + cname: ${{ matrix.cname }} enable_jekyll: true - full_commit_message: "dev: deploy n-claes/legolas@${{ github.sha }}" + full_commit_message: '${{ matrix.name }}: deploy n-claes/legolas@${{ github.sha }}'