Skip to content

Commit 7a1b672

Browse files
authored
Merge pull request #177 from TechAachen/fix-deployment-2
Fix deployment to new server (3)
2 parents 5a3715b + f216870 commit 7a1b672

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

.github/workflows/build-upload.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,20 @@ jobs:
3737
rm _site/techaachen-calendar.ics.in
3838
3939
- name: Upload to www.techaachen.de
40-
if: github.head_ref == 'refs/heads/main'
40+
if: github.event.pull_request.merged == true
4141
env:
4242
UPLOAD_AUTH_2: ${{ secrets.UPLOAD_AUTH_2 }}
4343
run: |
4444
cd _site
4545
find -type f -print0 | sed -z 's/^.\///' | xargs -P8 -I{} -0 curl -s --user $UPLOAD_AUTH_2 --fail -w '%{method} %{url} %{http_code}\n' -X PUT --upload-file ./{} https://www.techaachen.de/{}
4646
47-
- name: Upload to preview2.techaachen.de
48-
if: github.head_ref != 'refs/heads/main'
47+
- name: Upload to preview.techaachen.de
48+
if: github.event.pull_request.merged != true
4949
env:
5050
UPLOAD_AUTH_2: ${{ secrets.UPLOAD_AUTH_2 }}
5151
run: |
5252
export BRANCH=$(echo ${{github.head_ref}}|sed 's|refs/heads||')
5353
echo $BRANCH
5454
cd _site
55-
curl -s --user $UPLOAD_AUTH_2 -X DELETE https://preview2.techaachen.de/$BRANCH/ || true
56-
find -type f -print0 | sed -z 's/^.\///' | xargs -P8 -I{} -0 curl -s --user $UPLOAD_AUTH_2 --fail -w '%{method} %{url} %{http_code}\n' -X PUT --upload-file ./{} https://preview2.techaachen.de/$BRANCH/{}
55+
curl -s --user $UPLOAD_AUTH_2 -X DELETE https://preview.techaachen.de/$BRANCH/ || true
56+
find -type f -print0 | sed -z 's/^.\///' | xargs -P8 -I{} -0 curl -s --user $UPLOAD_AUTH_2 --fail -w '%{method} %{url} %{http_code}\n' -X PUT --upload-file ./{} https://preview.techaachen.de/$BRANCH/{}

0 commit comments

Comments
 (0)