Automatically deploy pull requests for testing #8
13
.gitea/workflows/cleanup-branch.yaml
Normal file
13
.gitea/workflows/cleanup-branch.yaml
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
name: Clean up branch.dsv.su.se
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- closed
|
||||||
|
jobs:
|
||||||
|
Cleanup-branch:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
echo "${{ secrets.BRANCH_CLEANUP_KEY }}" >> ssh_key
|
||||||
|
chmod 0600 ssh_key
|
||||||
|
- run: echo "${{ gitea.serverurl }}/${{ gitea.repository }}.git ${{ gitea.refname }}" | ssh -o StrictHostKeyChecking=accept-new -i ssh_key branch.dsv.su.se
|
@ -1,15 +1,13 @@
|
|||||||
name: Deploy to branch.dsv.su.se
|
name: Deploy to branch.dsv.su.se
|
||||||
on: [push]
|
on:
|
||||||
|
pull_request:
|
||||||
|
types:
|
||||||
|
- opened
|
||||||
jobs:
|
jobs:
|
||||||
Deploy-branch:
|
Deploy-branch:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- run: echo "${{ gitea.repository }}"
|
|
||||||
- run: echo "${{ gitea.refname }}"
|
|
||||||
- run: |
|
- run: |
|
||||||
echo "${{ secrets.DEPLOY_KEY }}" >> ssh_key
|
echo "${{ secrets.BRANCH_DEPLOY_KEY }}" >> ssh_key
|
||||||
chmod 0600 ssh_key
|
chmod 0600 ssh_key
|
||||||
- name: List files in the repository
|
|
||||||
run: ls -l ${{ gitea.workspace }}
|
|
||||||
- run: echo "${{ gitea.serverurl }}/${{ gitea.repository }}.git ${{ gitea.refname }}"
|
|
||||||
- run: echo "${{ gitea.serverurl }}/${{ gitea.repository }}.git ${{ gitea.refname }}" | ssh -o StrictHostKeyChecking=accept-new -i ssh_key branch.dsv.su.se
|
- run: echo "${{ gitea.serverurl }}/${{ gitea.repository }}.git ${{ gitea.refname }}" | ssh -o StrictHostKeyChecking=accept-new -i ssh_key branch.dsv.su.se
|
||||||
|
Loading…
x
Reference in New Issue
Block a user