-
-
Notifications
You must be signed in to change notification settings - Fork 44
48 lines (46 loc) · 1.39 KB
/
main.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
name: CI
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.2.3
bundler-cache: true
- run: bundle install
- run: bundle exec rake TESTOPTS=-v
build-search:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.x'
- run: python gen-stork.py > stork.toml
- run: wget https://files.stork-search.net/releases/v1.6.0/stork-ubuntu-22-04
- run: chmod +x stork-ubuntu-22-04
- run: ./stork-ubuntu-22-04 build --input stork.toml --output bgt.st
- name: Deploy to bgt server
if: github.ref == 'refs/heads/main'
uses: appleboy/scp-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
port: 2299
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
overwrite: true
source: "bgt.st"
target: "/var/www/search/"
deploy-fly:
runs-on: ubuntu-latest
name: Deploy app to fly
if: github.ref == 'refs/heads/main'
needs: [test]
steps:
- uses: actions/checkout@v4
- uses: superfly/flyctl-actions/setup-flyctl@master
- run: flyctl deploy --remote-only
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}