diff --git a/.github/workflows/11ty.yml b/.github/workflows/build-gh-pages.yml similarity index 91% rename from .github/workflows/11ty.yml rename to .github/workflows/build-gh-pages.yml index 1648182..a3f1cbf 100644 --- a/.github/workflows/11ty.yml +++ b/.github/workflows/build-gh-pages.yml @@ -1,10 +1,10 @@ # Sample workflow for building and deploying an Eleventy site to GitHub Pages -name: Deploy Eleventy with GitHub Pages dependencies preinstalled +name: Build & Deploy Eleventy with GitHub Pages dependencies preinstalled on: # Runs on pushes targeting the default branch push: - branches: ["main"] + pull_request: # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -45,6 +45,7 @@ jobs: deploy-ghpages: name: Deploy to github pages + if: github.event_name == 'push' && github.ref_name == 'main' environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }}