-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (37 loc) · 1.01 KB
/
cd.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: CD
on:
workflow_dispatch:
push:
branches: [master]
jobs:
push-to-vm:
name: Push to VM
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup python
uses: actions/setup-python@v2
with:
python-version: "3.9"
- name: Install Virtual Environment
run: pip install -r requirements.txt
- name: Build site
run: make build
- name: Push to VM
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
source: "output/"
target: "kalemiller.com/blog/"
strip_components: 1
rm: true
- name: Restart Caddy container
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.SSH_KEY }}
script: docker container restart caddy