From 2ba8db1fd3af6fe404d70a56854a3a46e78562c4 Mon Sep 17 00:00:00 2001 From: Alejandro Celaya Date: Sun, 9 May 2021 14:03:59 +0200 Subject: [PATCH] Ensured preview envs are generated on PRs only --- .github/workflows/deploy-preview.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/deploy-preview.yml b/.github/workflows/deploy-preview.yml index 9a471c69..2dc8bf8a 100644 --- a/.github/workflows/deploy-preview.yml +++ b/.github/workflows/deploy-preview.yml @@ -2,9 +2,6 @@ name: Deploy preview on: pull_request: null - push: - branches: - - main jobs: deploy: @@ -19,7 +16,7 @@ jobs: node-version: 14.15 - name: Generate slug id: generate_slug - run: echo "##[set-output name=slug;]$(echo ${GITHUB_REF#refs/heads/} | sed -r 's/[~\^]+//g' | sed -r 's/[^a-zA-Z0-9]+/-/g' | sed -r 's/^-+\|-+$//g' | tr A-Z a-z)" + run: echo "##[set-output name=slug;]$(echo ${GITHUB_HEAD_REF#refs/heads/} | sed -r 's/[~\^]+//g' | sed -r 's/[^a-zA-Z0-9]+/-/g' | sed -r 's/^-+\|-+$//g' | tr A-Z a-z)" - name: Build run: | npm ci && \