Skip to content

Commit

Permalink
[Fix] Deploy for forked repos (#253)
Browse files Browse the repository at this point in the history
  • Loading branch information
brapoprod authored Nov 23, 2023
1 parent 0e87c8c commit a4df54d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/accept-fork.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Apply Deploy Label

on:
pull_request:
types: [labeled]

jobs:
build_and_deploy_job:
if: github.event.label.name == 'Accept for Deploy'
runs-on: ubuntu-latest
name: Accept
steps:
- name: Accept
run: echo "Accepted"
11 changes: 6 additions & 5 deletions .github/workflows/deploy-fork.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
name: Azure Static Web Apps CI/CD
name: Deploy fork PR to dev

on:
pull_request:
types: [labeled]
workflow_run:
workflows: [Apply Deploy Label]
types:
- completed

jobs:
build_and_deploy_job:
if: github.event.label.name == 'Accept for Deploy'
runs-on: ubuntu-latest
name: Build and Deploy Job
steps:
Expand Down Expand Up @@ -35,7 +36,7 @@ jobs:
###### End of Repository/Build Configurations ######

close_pull_request_job:
if: github.repository != 'chili-publish/grafx-documentation' && github.event_name == 'pull_request' && github.event.action == 'closed'
if: github.event_name == 'pull_request' && github.event.action == 'closed'
runs-on: ubuntu-latest
name: Close Pull Request Job
steps:
Expand Down

0 comments on commit a4df54d

Please sign in to comment.