Skip to content

Commit c263e1a

Browse files
committed
feat: add CD workflow
GitHub Actions workflow that SSHes into the server after tests pass.
1 parent 7533804 commit c263e1a

1 file changed

Lines changed: 19 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Deploy
2+
3+
on:
4+
workflow_run:
5+
workflows: [Tests]
6+
types: [completed]
7+
branches: [master]
8+
9+
jobs:
10+
deploy:
11+
if: github.event.workflow_run.conclusion == 'success'
12+
runs-on: ubuntu-latest
13+
steps:
14+
- run: |
15+
mkdir -p ~/.ssh
16+
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_ed25519
17+
chmod 600 ~/.ssh/id_ed25519
18+
ssh-keyscan -H ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts
19+
ssh ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}

0 commit comments

Comments
 (0)