diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml new file mode 100644 index 00000000..85ee95bc --- /dev/null +++ b/.gitea/workflows/ci.yml @@ -0,0 +1,56 @@ +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' + runs-on: ubuntu-latest + needs: test + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: 18 + + - name: Install dependencies + run: npm ci + + - name: Build assets + run: npm run build + + # TODO: Add your deploy step here, for example: + # - name: Build and push Docker image + # run: | + # docker build -t iris . + # docker push your-registry/iris:latest + # + # Or scp to a server: + # - name: Deploy via rsync + # run: | + # rsync -avz --delete mopidy_iris/ user@server:/path/to/deploy diff --git a/.gitea/workflows/deploy.yml b/.gitea/workflows/deploy.yml index b3726a72..6e9fb428 100644 --- a/.gitea/workflows/deploy.yml +++ b/.gitea/workflows/deploy.yml @@ -14,6 +14,6 @@ jobs: username: root key: ${{ secrets.JAIL_KEY }} script: | - pip uninstall -y Iris + pip uninstall -y mopidy-iris pip install git+https://code.lab.unbl.ink/secstate/Iris@main service mopidy restart