name: deploy workflow run-name: deploy workflow on: push: branches: [ main ] jobs: Explore-Gitea-Actions: runs-on: runner steps: - name: Install useful tools run: apk update && apk add rsync openssh git - name: Pull project run: git clone https://git.cancerai.top/cancerai/my-website.git && cd my-website - name: Configure ssh key env: SSH_KEY: ${{ RUNNER_PRIVATE_KEY }} run: | mkdir -p ~/.ssh echo ${ SSH_KEY } > ~/.ssh/private_key chmod 600 ~/.ssh/private_key ssh-keyscan -p 2001 cancerai.top >> ~/.ssh/known_hosts - name: Push data to website server run: rsync --delete -e "ssh -i ~/.ssh/private_key -p 2001" ./ nginx@cancerai.top:www/owner/ - name: Clean key run: rm -rf ~/.ssh