Also run build github action on pull_request (#325)

This commit is contained in:
ligi 2021-07-05 14:02:31 +02:00 committed by GitHub
parent 49c41fd303
commit 17ec2dc9ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,5 +1,5 @@
name: Build and Deploy
on: [push]
on: [push, pull_request]
jobs:
build:
runs-on: ubuntu-latest
@ -22,14 +22,14 @@ jobs:
id: extract_branch
- name: Checkout
uses: actions/checkout@v2.3.1
if: steps.extract_branch.outputs.branch == 'master'
if: ${{ github.event_name != 'pull_request' && steps.extract_branch.outputs.branch == 'master' }}
- name: Build
run: |
./gradlew run
if: steps.extract_branch.outputs.branch == 'master'
if: ${{ github.event_name != 'pull_request' && steps.extract_branch.outputs.branch == 'master' }}
- name: Deploy
uses: JamesIves/github-pages-deploy-action@4.1.4
with:
branch: gh-pages
folder: output
if: steps.extract_branch.outputs.branch == 'master'
if: ${{ github.event_name != 'pull_request' && steps.extract_branch.outputs.branch == 'master' }}