1
0
mirror of https://github.com/elisspace/blog-test.git synced 2026-08-29 15:43:52 +00:00

add ssh_deploy action template

This commit is contained in:
Eli
2023-09-11 19:55:09 -04:00
committed by GitHub
parent 4f0a64d781
commit 82c6718a66

36
.github/ssh_deploy.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
# .github/workflows/ssh_deploy.yml
name: Deploy Eleventy via SSH
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE,
# so your workflow can access it
- uses: actions/checkout@master
# Build your static website with Eleventy
- name: Build Eleventy
uses: TartanLlama/actions-eleventy@master
with:
args: --output html
install_dependencies: true
# Copying files and artifacts via SSH
- name: Copying files to server
uses: appleboy/scp-action@master
with:
host: ${{ secrets.REMOTE_HOST }}
username: ${{ secrets.REMOTE_USER }}
key: ${{ secrets.SSH_KEY }}
passphrase: ${{ secrets.SSH_KEY_PASSPHRASE }}
rm: true
source: "html/"
target: "${{ secrets.REMOTE_DIR }}"