Skip to content

Update deploy.yml

Update deploy.yml #24

Workflow file for this run

name: deploy
on:
push:
branches:
- master
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true
- run: bundle install
- run: bundle exec htmlproofer $GITHUB_WORKSPACE/index.html
- run: which rsync
deploy:
runs-on: ubuntu-latest
needs: test
steps:
- uses: actions/checkout@v2
- env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
echo $SSH_PRIVATE_KEY > id_rsa
chmod 600 id_rsa
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add id_rsa
rm id_rsa
- env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: >
rsync -rq --links --delete --exclude=".*"
--exclude="Gemfile*" --exclude="deploy_key*"
. ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:${{ secrets.DEPLOY_PATH }}