diff --git a/.github/workflows/webpage.yml b/.github/workflows/webpage.yml index 9eb833c..2996017 100644 --- a/.github/workflows/webpage.yml +++ b/.github/workflows/webpage.yml @@ -3,7 +3,8 @@ name: Repository webpage on: push: branches: ["main"] - workflow_dispatch: + pull_request: + branches: ["main"] permissions: contents: read @@ -19,6 +20,14 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 + - uses: actions/cache@v4 + with: + path: | + vendor/bundle + .jekyll-cache + key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }} + restore-keys: | + ${{ runner.os }}-gem- - uses: actions/configure-pages@v5 - uses: actions/jekyll-build-pages@v1 with: @@ -27,6 +36,7 @@ jobs: - uses: actions/upload-pages-artifact@v3 deploy: + if: ${{ github.event_name != 'pull_request' }} environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }}