-
-
Notifications
You must be signed in to change notification settings - Fork 100
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
name: example - static | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- feature/* | ||
- hotfix/* | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
static: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: amondnet/vercel-action@v19 | ||
id: now-deployment-staging | ||
if: github.event_name == 'pull_request' | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
vercel-token: ${{ secrets.VERCEL_TOKEN }} | ||
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | ||
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID_STATIC }} | ||
working-directory: example/static | ||
alias-domains: | | ||
staging.static.vercel-action.amond.dev | ||
pr-{{PR_NUMBER}}.static.vercel-action.amond.dev | ||
- name: production or not | ||
id: prod_or_not | ||
run: | | ||
if [$REF == 'refs/heads/master'] | ||
then | ||
echo "::set-output name=vercel-args::--prod" | ||
else | ||
echo "::set-output name=vercel-args::" | ||
fi | ||
env: | ||
REF: ${{ github.ref }} | ||
- uses: ./ | ||
id: now-deployment-production | ||
if: github.event_name == 'push' | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
vercel-token: ${{ secrets.VERCEL_TOKEN }} | ||
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }} | ||
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID_STATIC }} | ||
vercel-args: ${{ steps.prod_or_not.outputs.vercel-args }} | ||
working-directory: example/static | ||
alias-domains: | | ||
{{BRANCH}}.static.vercel-action.amond.dev |
9846cb3
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deploy preview for zeit-now-deployment-action-example-static ready!
✅ Preview
https://zeit-now-deployment-action-example-static-5flf2db8f.vercel.app
https://hotfix-gh-30.static.vercel-action.amond.dev
Built with commit 9846cb3.
This pull request is being automatically deployed with vercel-action