diff --git a/.github/workflows/deploy_website.yml b/.github/workflows/deploy_website.yml index c7f0da9..055007d 100644 --- a/.github/workflows/deploy_website.yml +++ b/.github/workflows/deploy_website.yml @@ -7,6 +7,8 @@ on: # Triggers the workflow on push or pull request events but only for the "main" branch push: branches: [ "main" ] + pull_request: + branches: [ "main" ] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -37,8 +39,10 @@ jobs: run: | cd frontend npm run build-simple - + + # Deploy only when merging the pull request - name: Deploy Github Pages + if: ${{ github.event.pull_request.merged == true }} uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.REPO_ACCESS_TOKEN }}