28 lines
852 B
YAML
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}`
|
|
})
|