# This workflow uses actions that are not certified by GitHub. # They are provided by a third-party and are governed by # separate terms of service, privacy policy, and support # documentation. # ESLint is a tool for identifying and reporting on patterns # found in ECMAScript/JavaScript code. # More details at https://github.com/eslint/eslint # and https://eslint.org name: Deploy on: push: branches: [ "main", "github-deploy-action" ] pull_request: # The branches below must be a subset of the branches above branches: [ "main" ] jobs: deploy: name: Deploy Bot runs-on: ubuntu-latest permissions: contents: read security-events: write env: DEPLOY_HOST: 206.189.96.198 DEPLOY_PRIVATE_KEY: ${{ secrets.DEPLOY_PRIVATE_KEY }} REPO: git@github.com:veganhacktivists/arabot.git DEPLOY_USER: deploy steps: - name: setup-ssh run: | eval `ssh-agent -s` ssh-add - <<< "$DEPLOY_PRIVATE_KEY" ssh -o StrictHostKeyChecking=no ${DEPLOY_USER}@${DEPLOY_HOST} -C "cd /tmp && (git clone git@github.com:${GITHUB_REPOSITORY}) || (cd arabot && git pull && git checkout ${GITHUB_REF_NAME}) && cd arabot && docker-compose build"