Skip to content

feat: captcha input and password input #3

feat: captcha input and password input

feat: captcha input and password input #3

Workflow file for this run

name: Cleanup Deployed PR Server
on:
pull_request:
types: [closed]
jobs:
cleanup-server:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Stop and Remove Container
run: |
PR_NUMBER=${{ github.event.pull_request.number }}
# SSH into server to stop and remove the container
ssh -o StrictHostKeyChecking=no $DEPLOY_USER@$DEPLOY_HOST <<EOF
# rm -rf the directory
rm -rf $DEPLOY_DIR/pr-$PR_NUMBER
# Stop and remove the container for this PR
docker ps -q --filter "name=pr-${PR_NUMBER}" | xargs -r docker stop
docker ps -aq --filter "name=pr-${PR_NUMBER}" | xargs -r docker rm
EOF
env:
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
DEPLOY_DIR: ${{ secrets.DEPLOY_DIR }}