Files
timothykim.net/.gitea/workflows/build.yml
T
timothykim ff8e1043f7
Build and Push Docker Image / build (push) Has been cancelled
rename REGISTRY_TOKEN to CI_REGISTRY_TOKEN
2026-03-15 22:00:44 -04:00

32 lines
827 B
YAML

name: Build and Push Docker Image
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to Gitea Registry
run: echo "${{ secrets.CI_REGISTRY_TOKEN }}" | docker login git.timothykim.net -u ${{ gitea.actor }} --password-stdin
- name: Build and Push
uses: docker/build-push-action@v5
with:
context: .
push: true
tags: git.timothykim.net/hantim/static:latest
- name: Deploy
run: |
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
ssh -o StrictHostKeyChecking=accept-new -i ~/.ssh/deploy_key deploy@${{ vars.DEPLOY_HOST }} deploy-timothykim.net