Skip to content

Arrrgh ssh

Arrrgh ssh #34

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: 3.3
bundler-cache: true
- run: bundle install
- run: >
bundle exec htmlproofer
--ignore-status-codes 429
$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: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
mkdir -p ~/.ssh && touch ~/.ssh/known_hosts
ssh-keyscan ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts
rsync -rq --links --delete --exclude=".*" \
--exclude="Gemfile*" --exclude="deploy_key*" \
. ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:${{ secrets.DEPLOY_PATH }}