Skip to content

Commit

Permalink
modify workflow: don't deploy from non-master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
Seasawher committed Jan 11, 2024
1 parent 57a83f9 commit 71dd66d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
name: Deploy to github pages

on:
push:
branches:
- master
workflow_dispatch:
on: [push, pull_request]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
Expand Down Expand Up @@ -48,6 +44,7 @@ jobs:
path: ./book

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

0 comments on commit 71dd66d

Please sign in to comment.