45 lines
901 B
YAML
45 lines
901 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
pull_request:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 18
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Lint
|
|
run: npm run lint
|
|
|
|
- name: Test
|
|
run: npm test
|
|
|
|
deploy:
|
|
if: github.ref == 'refs/heads/main' && needs.test.result == 'success'
|
|
runs-on: ubuntu-latest
|
|
needs: test
|
|
steps:
|
|
- name: SSH and upgrade package
|
|
uses: appleboy/ssh-action@v1.0.3
|
|
with:
|
|
host: mopidy-dev.service
|
|
username: root
|
|
key: ${{ secrets.JAIL_KEY }}
|
|
script: |
|
|
pip uninstall -y mopidy-iris
|
|
pip install git+https://code.lab.unbl.ink/secstate/Iris@main
|
|
service mopidy restart
|