Andreas Svanberg 3cdce10db1
All checks were successful
Cleanup branch.dsv.su.se / cleanup (pull_request) Successful in 7s
Deploy to branch.dsv.su.se / deploy (pull_request) Successful in 24s
Test cleanup
2024-11-25 13:04:08 +01:00

28 lines
852 B
YAML

name: Deploy to branch.dsv.su.se
on:
pull_request:
types: [opened, reopened, synchronize]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- id: deploy
uses: https://gitea.dsv.su.se/ansv7779/action-branch-deploy@510ddaa0b9507c6c1bc288582ef6e23b8b5b6089
with:
compose-file: 'compose-branch.yaml'
- name: Post URL to deployment as comment
uses: actions/github-script@v7
if: github.event.action == 'opened'
env:
BRANCH_URL: ${{ steps.deploy.outputs.url }}
with:
script: |
const url = process.env.BRANCH_URL;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Deployed to ${url}`
})