Skip to content

Commit

Permalink
chore(website): only deploy website when there is a new release
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Mar 27, 2024
1 parent ce67185 commit 8651832
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
push:
branches:
- main
tags:
- "v*.*.*"
pull_request:
branches:
- main
Expand All @@ -24,7 +26,7 @@ env:
jobs:
test-deploy:
name: Test deployment
if: github.event_name == 'pull_request'
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
runs-on: ubuntu-22.04
steps:
- name: Checkout
Expand All @@ -44,7 +46,7 @@ jobs:

deploy:
name: Deploy website
if: github.event_name != 'pull_request'
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-22.04
environment:
name: github-pages
Expand Down

0 comments on commit 8651832

Please sign in to comment.