Skip to content
This repository was archived by the owner on Mar 19, 2025. It is now read-only.

Commit 1ec442f

Browse files
committed
[CD] wip
1 parent 711177d commit 1ec442f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/build-and-deploy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@ name: Build and Deploy
33
on:
44
workflow_dispatch:
55
push:
6+
branches:
7+
- 'main'
68
tags:
79
- 'v*'
810
pull_request:
@@ -34,6 +36,7 @@ jobs:
3436
type=ref,event=pr
3537
type=semver,pattern={{version}}
3638
type=semver,pattern={{major}}.{{minor}}
39+
type=raw,value=latest,enable={{is_default_branch}}
3740
3841
- name: Build and push
3942
uses: docker/build-push-action@v6
@@ -47,7 +50,7 @@ jobs:
4750
deploy:
4851
runs-on: ubuntu-latest
4952
needs: build
50-
if: startsWith(github.ref, 'refs/tags/v') # Run only when a new tag is created
53+
if: github.ref == 'refs/heads/main'
5154

5255
steps:
5356
- name: SSH into server and deploy

0 commit comments

Comments
 (0)