about summary refs log tree commit diff
diff options
context:
space:
mode:
authorflip1995 <hello@philkrones.com>2020-02-12 14:49:08 +0100
committerflip1995 <hello@philkrones.com>2020-02-12 15:01:39 +0100
commit3241e4fed451b12e0fc347b1a2f884c832f2294e (patch)
tree6e3fe868f21543bb8093ba3ba03912e0c7f271c7
parent2432a16973bf50665f75cb3e56cab1611bd96ec0 (diff)
downloadrust-3241e4fed451b12e0fc347b1a2f884c832f2294e.tar.gz
rust-3241e4fed451b12e0fc347b1a2f884c832f2294e.zip
Run deploy workflow on tags, instead of releases
-rw-r--r--.github/workflows/deploy.yml11
1 files changed, 7 insertions, 4 deletions
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 93300b6e124..be40b27440d 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -4,15 +4,13 @@ on:
   push:
     branches:
       - master
-  release:
-    types:
-      - created
+    tags:
+      - rust-1.**
 
 env:
   TARGET_BRANCH: 'gh-pages'
   SHA: '${{ github.sha }}'
   SSH_REPO: 'git@github.com:${{ github.repository }}.git'
-  TAG_NAME: '${{ github.event.release.GITHUB_REF }}'
 
 jobs:
   deploy:
@@ -30,6 +28,11 @@ jobs:
         path: 'out'
 
     # Run
+    - name: Set tag name
+      if: startswith(github.ref, 'refs/tags/')
+      run: |
+        TAG=$(basename ${{ github.ref }})
+        echo "::set-env name=TAG_NAME::$TAG"
     - name: Deploy
       run: |
         eval "$(ssh-agent -s)"