Skip to content

Commit

Permalink
Use rlespinasse/github-slug-action to detect current branch (will be …
Browse files Browse the repository at this point in the history
…useful later to trigger production deployment on master branch)
  • Loading branch information
Vadorequest committed Jan 11, 2021
1 parent f5e4923 commit e6251e6
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/deploy-vercel-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# Dependencies overview:
# - See https://github.com/actions/setup-node https://github.com/actions/setup-node/tree/v1
# - See https://github.com/actions/checkout https://github.com/actions/checkout/tree/v1
# - See https://github.com/actions/upload-artifact https://github.com/actions/upload-artifact/tree/v1
# - See https://github.com/rlespinasse/github-slug-action https://github.com/rlespinasse/github-slug-action/tree/3.x
# - See https://github.com/jwalton/gh-find-current-pr https://github.com/jwalton/gh-find-current-pr/tree/v1
# - See https://github.com/peter-evans/create-or-update-comment https://github.com/peter-evans/create-or-update-comment/tree/v1

Expand Down Expand Up @@ -42,12 +42,17 @@ jobs:
needs: setup-environment
steps:
- uses: actions/checkout@v1 # Get last commit pushed - See https://github.com/actions/checkout

- name: Expose GitHub slug/short variables # See https://github.com/rlespinasse/github-slug-action#exposed-github-environment-variables
uses: rlespinasse/[email protected] # See https://github.com/rlespinasse/github-slug-action

- name: Deploying on Vercel
# Workflow overview:
# - TODO
run: |
# Print the version of the "vercel" CLI being used (helps debugging)
vercel --version
echo "Current branch: ${GITHUB_REF_SLUG}"
echo "Installing dependencies"
yarn install
Expand Down Expand Up @@ -91,6 +96,8 @@ jobs:
fi
env:
VERCEL_TOKEN: ${{ secrets.VERCEL_TOKEN }} # Passing github's secret to the worker
# Passing exposed GitHub environment variables - See https://github.com/rlespinasse/github-slug-action#exposed-github-environment-variables
GITHUB_REF_SLUG: ${{ env.GITHUB_REF_SLUG }}

# We need to find the PR id. Will be used later to comment on that PR.
- name: Finding Pull Request ID
Expand Down

1 comment on commit e6251e6

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.