diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml index e13042d..030f2a1 100644 --- a/.github/workflows/deploy-docs.yml +++ b/.github/workflows/deploy-docs.yml @@ -1,6 +1,11 @@ name: Build and Deploy docs -on: ["push", "pull_request"] +on: + pull_request: + + push: + tags: + - "v*" jobs: run: @@ -9,14 +14,14 @@ jobs: - uses: actions/checkout@v3 - name: Setup Micromamba - uses: mamba-org/provision-with-micromamba@main + uses: mamba-org/provision-with-micromamba@v13 with: environment-file: false - name: Create environment shell: bash -l {0} run: | - micromamba create --name TEST python=3 python-build numpy --file requirements-dev.txt --channel conda-forge + micromamba create --name TEST python=3 numpy --file requirements-dev.txt --channel conda-forge micromamba activate TEST pip install -e . --no-deps --force-reinstall conda info --all @@ -32,8 +37,8 @@ jobs: popd - name: GitHub Pages action - if: ${{ github.event_name == 'release' }} - uses: peaceiris/actions-gh-pages@v3.6.1 + if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/v') + uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: docs/_build/html