-
Notifications
You must be signed in to change notification settings - Fork 13
37 lines (35 loc) · 1007 Bytes
/
ci.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
name: CI
on: [push, pull_request]
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Install Zola
run: |
mkdir bin
curl -sSL https://github.com/getzola/zola/releases/download/v0.15.3/zola-v0.15.3-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
echo "$(pwd)/bin" >> ${GITHUB_PATH}
- name: Report versions
run: |
zola -V
# - name: Check links
# run: zola check
- name: Build HTML
run: zola build
deploy:
if: ${{ github.ref == 'refs/heads/master' }}
name: Deploy
runs-on: ubuntu-latest
needs: test
steps:
- name: Deploy to server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script: |
./tools/rust-deploy/rw-zola.sh -u >/dev/null 2>&1