-
Notifications
You must be signed in to change notification settings - Fork 0
56 lines (49 loc) · 1.5 KB
/
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
45
46
47
48
49
50
51
52
53
54
55
56
name: Crystal main test & deploy
on:
push:
branches: ["main"]
jobs:
spec:
name: Execute Crystal spec
runs-on: ubuntu-latest
container:
image: crystallang/crystal
steps:
- uses: actions/checkout@v3
- name: Install apt dependencies
run: |
apt update -y
apt install -y g++ cmake wget libapparmor-dev fossil
- uses: robinraju/[email protected]
id: dl_fj
with:
repository: "netblue30/firejail"
latest: true
fileName: "*amd64.deb"
- name: Install firejail
run: apt install -y "${{ fromJson(steps.dl_fj.outputs.downloaded_files)[0] }}"
- name: Shards install
run: shards install
- name: Run tests
run: LOG_LEVEL=error crystal spec
deploy:
name: Deploy
needs: spec
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands using password
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: |
cd /srv/crystaldoc.info/
git pull
shards install
shards build --release -Dpreview_mt
./bin/crystaldoc micrate up
systemctl --user restart crystaldoc-server.service
systemctl --user restart crystaldoc-searcher.service
systemctl --user restart crystaldoc-builder.service