Skip to content

Fix TS typing

Fix TS typing #21

Workflow file for this run

name: CI
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
- name: Setup pnpm
uses: pnpm/action-setup@d882d12c64e032187b2edb46d3a0d003b7a43598 # v2.4.0
with:
version: 8.13.1
- name: Setup Node
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
with:
node-version: 20.x
cache: pnpm
- name: Install
run: pnpm install --frozen-lockfile
- name: Build
run: pnpm run build
- name: Test
run: pnpm run test
- name: Lint
run: pnpm run lint
- name: TypeCheck
run: pnpm run typecheck
# docker build and publish
- name: Log in to Docker Hub
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3.0.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9dc751fe249ad99385a2583ee0d084c400eee04e # v5.4.0
with:
images: totakoko/spotiblind
- name: Build and push Docker image
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5.1.0
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
deploy:
if: github.ref == 'refs/heads/main'
needs: build
name: Deploy to production
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Update production
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3
env:
SSH_HOST: ${{ secrets.SSH_HOST }}
SSH_PORT: ${{ secrets.SSH_PORT }}
SSH_USER: ${{ secrets.SSH_USER }}
SSH_FINGERPRINT: ${{ secrets.SSH_FINGERPRINT }}
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
with:
image: totakoko/compose-deploy:latest
options: -e SSH_HOST -e SSH_PORT -e SSH_USER -e SSH_FINGERPRINT -e SSH_PRIVATE_KEY
run: |
compose-deploy update-module spotiblind ui