diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 78879cf04..2f9adb662 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -49,7 +49,7 @@ jobs: run: | make html - - name: Upload documentation to sites + - name: Upload pull request documentation to sites if: github.event.pull_request.head.repo.full_name == 'ecmwf-ifs/loki' env: SITES_TOKEN: ${{ secrets.SITES_TOKEN }} @@ -57,6 +57,14 @@ jobs: run: | ./sites-manager.py --space=docs --name=loki --token "$SITES_TOKEN" upload build/html ${{ github.event.pull_request.number }} || true + - name: Update documentation on sites + if: github.event_name != 'pull_request' + env: + SITES_TOKEN: ${{ secrets.SITES_TOKEN }} + working-directory: ./docs + run: | + ./sites-manager.py --space=docs --name=loki --token "$SITES_TOKEN" upload --clean build/html ${{ github.ref_name }} || true + - name: Find Comment if: github.ref_name != 'main' uses: peter-evans/find-comment@v2