Skip to content

Commit

Permalink
Remove duplicated check before deployment (#582)
Browse files Browse the repository at this point in the history
Remove duplicated branch check before deploying from Actions.
  • Loading branch information
santisoler authored Dec 4, 2024
1 parent 35d9fda commit 7e97c55
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/python-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
deploy:
runs-on: ubuntu-latest
needs: test
if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main' # deploy only from main
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
Expand All @@ -66,10 +66,8 @@ jobs:
python _ext/copy_images.py
- name: GitHub Pages
# Only deploy if the event that triggered was a push to main
# (only pushes to main triggers builds, see 'on' condition in the
# beginning of the file)
if: success() && github.event_name == 'push'
# Only deploy if the build was successful
if: success()
uses: crazy-max/ghaction-github-pages@v2.5.0
with:
build_dir: _build/html
Expand Down

0 comments on commit 7e97c55

Please sign in to comment.