feat: captcha input and password input #3
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: 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 }} |