Browse Source

use tag instead of branch (#2973)

Stefan McShane 3 years ago
parent
commit
33831b7a9f
2 changed files with 21 additions and 1 deletions
  1. 1 1
      .github/workflows/production.yaml
  2. 20 0
      Taskfile.yaml

+ 1 - 1
.github/workflows/production.yaml

@@ -1,7 +1,7 @@
 name: Deploy to production
 on:
   push:
-    branches:
+    tags:
       - production
 jobs:
   deploy:

+ 20 - 0
Taskfile.yaml

@@ -0,0 +1,20 @@
+version: '3'
+
+tasks:
+  move-to-production:
+    desc: Move the current branch to production
+    cmds:
+    - cmd: git tag -d production
+      ignore_error: false
+      silent: true
+    - cmd: git push origin :production
+      ignore_error: false
+      silent: true
+    - cmd: git tag production
+      ignore_error: false
+      silent: true
+    - cmd: git push origin production
+      ignore_error: false
+      silent: true
+ 
+