-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (36 loc) · 963 Bytes
/
deploy.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
name: Deploy Zola Blog to Linode
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: fedora:latest
steps:
- name: Checkout code
uses: actions/checkout@v2
with:
submodules: true
- name: Install Zola
run: sudo dnf install zola
- name: Build Zola site
run: |
zola build
- name: Deploy to Linode
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.LINODE_IP }}
username: ${{ secrets.LINODE_USERNAME }}
key: ${{ secrets.LINODE_SSH_KEY }}
script: |
# Clone the repository
git clone https://github.com/katxhal/xelog.git
cd xelog
# Build the Zola site
zola build
# Serve the Zola site
zola serve --interface 0.0.0.0 --port 8080 &
# Keep the process running
while true; do
sleep 60
done