bgt343 #452
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: CI | |
on: [push] | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.3.4 | |
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 }} |