SkillLab integration #1472
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Pull Request - Set Up | |
permissions: | |
pull-requests: write | |
on: | |
pull_request: | |
types: [opened, reopened] | |
jobs: | |
create-deployment: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository files | |
uses: actions/checkout@v4 | |
- name: Prepare server deployment | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
script: | | |
cd /var/docker | |
cp -r x-pr pr-${{ github.event.number }} | |
sed -i "s/<PR_NUMBER>/${{ github.event.number }}/g" pr-${{ github.event.number }}/docker-compose.yml | |
- name: Post comment on PR | |
run: | | |
curl -X POST \ | |
-H "Authorization: token ${{ secrets.GITHUB_TOKEN }}" \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
https://api.github.com/repos/Aam-Digital/ndb-core/issues/${{ github.event.number }}/comments \ | |
-d '{"body":"Deployed to https://pr-${{ github.event.number }}.aam-digital.net/"}' |