Skip to content

Commit

Permalink
only run deploy job for main branch
Browse files Browse the repository at this point in the history
  • Loading branch information
ghorbanzade committed Feb 19, 2024
1 parent 1859bb4 commit 26cfadc
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@v3
id: changes
with:
filters: .github/path-filters.yml
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
tar -zxf cppcon23.tar.gz .
if: steps.changes.outputs.cppcon23 == 'false'
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cppcon23
path: ${{ github.workspace }}/cppcon23.tar.gz
Expand All @@ -86,7 +86,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@v3
id: changes
with:
filters: .github/path-filters.yml
Expand Down Expand Up @@ -131,7 +131,7 @@ jobs:
tar -zxf cppcon21.tar.gz .
if: steps.changes.outputs.cppcon21 == 'false'
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: cppcon21
path: ${{ github.workspace }}/cppcon21.tar.gz
Expand All @@ -142,7 +142,7 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@v3
id: changes
with:
filters: .github/path-filters.yml
Expand All @@ -168,7 +168,7 @@ jobs:
tar -zxf bazelcon23.tar.gz .
if: steps.changes.outputs.bazelcon23 == 'false'
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: bazelcon23
path: ${{ github.workspace }}/bazelcon23.tar.gz
Expand All @@ -178,7 +178,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
- uses: dorny/paths-filter@v3
id: changes
with:
filters: .github/path-filters.yml
Expand Down Expand Up @@ -215,7 +215,7 @@ jobs:
tar -zxf web.tar.gz .
if: steps.changes.outputs.web == 'false'
- name: Upload artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: web
path: ${{ github.workspace }}/web.tar.gz
Expand Down Expand Up @@ -264,6 +264,7 @@ jobs:

deploy:
needs: bundle
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down

0 comments on commit 26cfadc

Please sign in to comment.