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