updated the version of the action in the docs (#246) #367
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
name: example - angular | |
on: | |
push: | |
branches: | |
- master | |
pull_request_target: | |
jobs: | |
angular: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/cache@v1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: build | |
run: | | |
cd example/angular | |
npm ci | |
npx ng build --prod | |
- uses: ./ | |
id: vercel-action-staging | |
if: github.event_name == 'pull_request_target' | |
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_ANGULAR }} | |
working-directory: example/angular/dist/angular | |
alias-domains: | | |
staging.angular.vercel-action.amond.dev | |
pr-{{PR_NUMBER}}.angular.vercel-action.amond.dev | |
- uses: ./ | |
id: vercel-action-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_ANGULAR }} | |
working-directory: example/angular/dist/angular | |
vercel-args: '--prod ' |