Skip to content

move repo to slice-of-bits #8

move repo to slice-of-bits

move repo to slice-of-bits #8

Workflow file for this run

name: CI
on:
push:
branches:
- main
jobs:
build-and-deploy:
runs-on: ubuntu-latest
env:
PNPM_HOME: /home/runner/.local/share/pnpm
PUBLIC_API_HOST: ${{ secrets.PUBLIC_API_HOST }}
PUBLIC_AUTH_CLIENT_ID: ${{ secrets.PUBLIC_AUTH_CLIENT_ID }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Use latest LTS Node.js
uses: actions/setup-node@v4
with:
node-version: '24'
- name: Set up pnpm
uses: pnpm/action-setup@v4
with:
version: 10
- name: Install dependencies
run: pnpm install
- name: Build project
run: pnpm build
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: ghcr.io/${{ github.repository }}:latest
- name: Deploy via SSH
uses: appleboy/ssh-action@v0.1.10
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: 22
command_timeout: 2m
script: |
cd hapmap/
docker-compose pull && docker-compose up -d