From fdb82bddf59feddb8df180d4cffc9c52c03915df Mon Sep 17 00:00:00 2001 From: Anton Vakhrushev Date: Sat, 12 Apr 2025 20:14:03 +0300 Subject: [PATCH] Add production image build --- Taskfile.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Taskfile.yml b/Taskfile.yml index 2a0314e..73304b0 100644 --- a/Taskfile.yml +++ b/Taskfile.yml @@ -106,3 +106,14 @@ tasks: POST_DATE: sh: date +'%Y-%m-%d' cmd: touch "source/_articles/{{.POST_DATE}}-new-post.md" + + deploy: + vars: + COMMIT_HASH: + sh: git rev-parse --short HEAD + TIMESTAMP: + sh: date +%s + IMAGE_TAG: homepage-nginx:{{.COMMIT_HASH}}-{{.TIMESTAMP}} + cmds: + - task: build-prod + - docker build --pull --file docker/Dockerfile.nginx.prod --tag {{.IMAGE_TAG}} .