deploy to linode #14
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Zola Blog to Linode | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
with: | |
submodules: true | |
- 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 |