File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 55 # Runs on pushes targeting the default branch
66 push :
77 branches : ["main"]
8+ pull_request :
9+ branches : ["main"]
810
911 # Allows you to run this workflow manually from the Actions tab
1012 workflow_dispatch :
@@ -53,10 +55,10 @@ jobs:
5355 HUGO_CACHEDIR : ${{ runner.temp }}/hugo_cache
5456 HUGO_ENVIRONMENT : production
5557 run : |
56- npm_config_yes=true npx pagefind --site 'public' --output-path 'static/pagefind'
5758 hugo \
5859 --minify \
5960 --baseURL "${{ steps.pages.outputs.base_url }}/"
61+ npm_config_yes=true npx pagefind --site 'public' --output-path 'public/pagefind'
6062 - name : Upload artifact
6163 uses : actions/upload-pages-artifact@v3
6264 with :
6971 url : ${{ steps.deployment.outputs.page_url }}
7072 runs-on : ubuntu-latest
7173 needs : build
74+ if : github.ref == 'refs/heads/main'
7275 steps :
7376 - name : Deploy to GitHub Pages
7477 id : deployment
You can’t perform that action at this time.
0 commit comments