Skip to content

fix: set term_id on enrollment during backend import #61

fix: set term_id on enrollment during backend import

fix: set term_id on enrollment during backend import #61

Workflow file for this run

name: Deploy
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: read
packages: write
jobs:
deploy:
name: Build & deploy to alastor
runs-on: ubuntu-24.04-arm
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to ghcr.io
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push image
id: build
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: |
ghcr.io/witcodingclub/calendar-backend:latest
ghcr.io/witcodingclub/calendar-backend:main
ghcr.io/witcodingclub/calendar-backend:${{ github.sha }}
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Deploy to alastor
env:
DEPLOY_KEY: ${{ secrets.WIT_CALENDAR_DEPLOY_KEY }}
SERVER_HOST: ${{ secrets.SERVER_HOST }}
IMAGE: ghcr.io/witcodingclub/calendar-backend:${{ github.sha }}
run: |
mkdir -p ~/.ssh
echo "$DEPLOY_KEY" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
ssh -i ~/.ssh/deploy_key \
-o StrictHostKeyChecking=no \
-o ConnectTimeout=10 \
wit-calendar-deploy@"$SERVER_HOST" \
"echo '$IMAGE' > /var/lib/wit-calendar/image-ref && \
sudo systemctl restart wit-calendar-web"