Skip to content

Commit

Permalink
๏ฟฝfix: deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
dongchandev authored Oct 15, 2024
1 parent a474b67 commit 67c5679
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
name: Trigger Web Deploy

on:
pull_request:
branches:
- develop
types: [closed]

push:
branches:
- develop
Expand All @@ -13,6 +18,15 @@ jobs:
- name: Checkout Code
uses: actions/checkout@v2

- name: Set Payload
id: set_payload
run: |
if [ "${{ github.event_name }}" == "pull_request" ]; then
echo "PR_TITLE=${{ github.event.pull_request.title }}" >> $GITHUB_ENV
elif [ "${{ github.event_name }}" == "push" ]; then
echo "COMMIT_MESSAGE=${{ github.event.head_commit.message }}" >> $GITHUB_ENV
fi
- name: Trigger Deploy
uses: peter-evans/repository-dispatch@v2
with:
Expand All @@ -26,5 +40,6 @@ jobs:
"source_directory": "./build",
"project_name": "dodam",
"destination_directory": "/myinfo",
"config_secret": "${{ secrets.CONFIG_JSON }}"
"config_secret": "${{ secrets.CONFIG_JSON }}",
"title_or_message": "${{ env.PR_TITLE || env.COMMIT_MESSAGE }}"
}

0 comments on commit 67c5679

Please sign in to comment.