Skip to content

Commit

Permalink
use newer gha
Browse files Browse the repository at this point in the history
  • Loading branch information
dskvr committed Apr 10, 2024
1 parent 9e98dad commit a42d7cd
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: build
run: |
ls -la
Expand All @@ -27,19 +27,17 @@ jobs:
run: ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts

- name: check if remote file exists
uses: fifsky/ssh-action@master
id: version-exists
uses: appleboy/[email protected]
with:
command: |
host: ${{ secrets.SSH_HOST }}
key: ${{ secrets.SSH_PRIVATE_KEY }}
script: |
if [ -f /var/www/html/${{ steps.package-version.outputs.current-version}} ]; then
exists=yes
else
exists=no
fi
echo "EXISTS=$exists" >> "$GITHUB_OUTPUT"
host: ${{ secrets.SSH_HOST }}
user: root
key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: fail if version exists
if: ${{ steps.version-exists.outputs.EXISTS == 'yes' }}
Expand Down

0 comments on commit a42d7cd

Please sign in to comment.