diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index f45fd75..aa7936d 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -2,14 +2,9 @@ name: Deploy docs on: - # Runs on pushes targeting the default branch + pull_request: push: branches: ["main"] - # TODO: needed ? - # schedule: - # - cron: 0 0 * * 1 - - # Allows you to run this workflow manually from the Actions tab workflow_dispatch: # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages @@ -63,12 +58,15 @@ jobs: - name: Setup Pages uses: actions/configure-pages@v3 + if: success() && github.ref == 'refs/heads/main' - name: Upload artifact uses: actions/upload-pages-artifact@v1 + if: success() && github.ref == 'refs/heads/main' with: path: ./public - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v2 + if: success() && github.ref == 'refs/heads/main'