Skip to content

Commit fefd468

Browse files
committed
chore(gh-action): build eleventy sur push et pr toutes les branches, mais gh-pages uniquement push sur main
1 parent d29d558 commit fefd468

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/11ty.yml renamed to .github/workflows/build-gh-pages.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# Sample workflow for building and deploying an Eleventy site to GitHub Pages
2-
name: Deploy Eleventy with GitHub Pages dependencies preinstalled
2+
name: Build & Deploy Eleventy with GitHub Pages dependencies preinstalled
33

44
on:
55
# Runs on pushes targeting the default branch
66
push:
7-
branches: ["main"]
7+
pull_request:
88

99
# Allows you to run this workflow manually from the Actions tab
1010
workflow_dispatch:
@@ -45,6 +45,7 @@ jobs:
4545

4646
deploy-ghpages:
4747
name: Deploy to github pages
48+
if: github.event_name == 'push' && github.ref_name == 'main'
4849
environment:
4950
name: github-pages
5051
url: ${{ steps.deployment.outputs.page_url }}

0 commit comments

Comments
 (0)