diff --git a/.github/workflows/deployment.yml b/.github/workflows/deployment.yml new file mode 100644 index 0000000..d149603 --- /dev/null +++ b/.github/workflows/deployment.yml @@ -0,0 +1,24 @@ +name: Deploy to DigitalOcean Droplet +'on': + push: + branches: + - master, workflows-action + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - name: Deploy to DigitalOcean Droplet + uses: appleboy/ssh-action@master + with: + host: ${{secrets.HOST}} + username: ${{secrets.USERNAME}} + key: ${{secrets.KEY}} + script: | + export NVM_DIR=~/.nvm + source ~/.nvm/nvm.sh + rm -rf test + mkdir test + cd test + git clone git@github.com:username/projectname + echo 'Deployment to digital ocean finished' \ No newline at end of file