diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 7b4a306..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,36 +0,0 @@ -name: deploy - -on: pull_request - -env: - TAG: v0.0.1 - IMAGE_NAME: ${{ vars.IMAGE_NAME }} - DOCKER_REGISTRY: ${{ secrets.DOCKER_REGISTRY }} - -jobs: - deploy: - runs-on: ubuntu-latest - - steps: - - name: clone and docker compose up - uses: appleboy/ssh-action@master - env: - CERT_PATH: ${{ secrets.CERT_PATH }} - CERT_KEY_PATH: ${{ secrets.CERT_KEY_PATH }} - PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }} - CERTIFICATE: ${{ secrets.CERTIFICATE }} - NGINX_CONF: ${{ secrets.NGINX_CONF }} - with: - host: ${{ secrets.HOST }} - username: ${{ secrets.USERNAME }} - password: ${{ secrets.PASSWORD }} - envs: TAG,IMAGE_NAME,DOCKER_REGISTRY,CERT_PATH,CERT_KEY_PATH,PRIVATE_KEY,CERTIFICATE,NGINX_CONF - script: | - rm -rf repo - git clone https://github.com/${{github.repository}} repo && cd repo - git fetch origin refs/pull/49/head - git checkout FETCH_HEAD - chmod +x ./setup_env.sh - ./setup_env.sh - docker-compose -f docker-compose.prod.yml down - docker-compose -f docker-compose.prod.yml up -d