-
Notifications
You must be signed in to change notification settings - Fork 114
33 lines (29 loc) · 1.15 KB
/
version-deployment.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
on:
pull_request:
branches:
- main
types: [closed]
jobs:
changeset:
if: github.event.pull_request.merged == true && github.event.pull_request.head.label == 'NiklasBuchfink:changeset-release/main'
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: '2' # Fetches the last two commits
- name: Check for changes in inlang/source-code/editor/package.json
id: check_changes
run: |
echo "CHANGES=$(git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} | grep 'inlang/source-code/editor/package.json')"
if [ -n "$CHANGES" ]; then
echo "Changes in inlang/source-code/editor/package.json"
echo "changes=true" >> $GITHUB_ENV
else
echo "No changes in inlang/source-code/editor/package.json"
echo "changes=false" >> $GITHUB_ENV
- name: Trigger redeploy
if: env.changes == 'true'
run: |
echo "Triggering redeploy via deploy hook"
curl -X POST ${{ secrets.FINK_DEPLOY_HOOK_URL }}