I'm trying to clone a repository from GitHub to a remote server.
My solution using appleboy/ssh-action GitHub action was working but I was told the same can be achieved using actions/checkout@v2 GitHub action. I tried to just change - uses: value to actions/checkout@V2` but then the code doesn't work.
I can't find any templates on how to do it using actions/checkout@v2. Any advice would be much appreciated.
name: deploy to a server on push
on:
push:
branches: [ master ]
jobs:
deploy-to-server:
runs-on: ubuntu-latest
steps:
- uses: appleboy/ssh-action@master
with:
host: 123.132.123.132
username: tomas
key: ${{ secrets.PRIVATE_KEY }}
port: 59666
script:
git clone https://github.com/Tomas-R/website.git