Files
branch-deploy-testing/.gitea/workflows/deploy-branch.yaml
Andreas Svanberg 785faaacbb
All checks were successful
Deploy to branch.dsv.su.se / deploy (pull_request) Successful in 30s
Only post URL when PR is opened
2024-10-31 14:32:04 +01:00

28 lines
908 B
YAML

name: Deploy to branch.dsv.su.se
on: pull_request
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- id: deploy
uses: https://gitea.dsv.su.se/ansv7779/action-branch-deploy@e2788b9321d1e64cd8c2148e1a1a30724c29c7a1
with:
gitea-token: ${{ secrets.GITEA_TOKEN }}
ssh-key: ${{ secrets.BRANCH_DEPLOY_KEY }}
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}`
})