|
| 1 | +name: "CI" |
| 2 | + |
1 | 3 | on: |
2 | 4 | pull_request: |
3 | | - types: [opened, synchronize] |
4 | 5 | push: |
5 | 6 | branches: |
6 | 7 | - main |
7 | 8 |
|
8 | | -name: "Deploy" |
9 | | - |
10 | 9 | jobs: |
11 | | - build-and-deploy: |
| 10 | + test: |
12 | 11 | runs-on: ubuntu-latest |
13 | 12 | steps: |
14 | | - - uses: actions/checkout@v2 |
15 | | - - uses: pnpm/action-setup@646cdf48217256a3d0b80361c5a50727664284f2 |
| 13 | + - uses: actions/checkout@v1 |
| 14 | + - uses: pnpm/action-setup@v2 |
16 | 15 | with: |
17 | | - version: 6.23.6 |
| 16 | + version: 7.1.0 |
18 | 17 | - uses: actions/setup-node@v2 |
19 | 18 | with: |
20 | | - node-version: "14" |
21 | | - cache: pnpm |
| 19 | + node-version: 14 |
| 20 | + cache: "pnpm" |
22 | 21 |
|
23 | 22 | - run: pnpm install |
24 | | - - run: pnpm build |
| 23 | + |
25 | 24 | - run: pnpm test |
26 | 25 | - run: pnpm lint |
27 | | - |
28 | | - - run: pnpm prepare-deploy |
29 | | - |
30 | | - # deploy app |
31 | | - - uses: ngduc/vercel-deploy-action@master |
32 | | - if: ${{ github.ref == 'refs/heads/main' }} |
33 | | - with: |
34 | | - vercel-cli: vercel |
35 | | - vercel-project-id: ${{ secrets.VERCEL_APP_PROJECT_ID}} |
36 | | - vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} |
37 | | - vercel-token: ${{ secrets.VERCEL_TOKEN }} |
38 | | - scope: ${{ secrets.VERCEL_ORG_ID }} |
39 | | - working-directory: packages/vscode-host/dist |
40 | | - vercel-args: "--prod" |
41 | | - env: |
42 | | - ACTIONS_ALLOW_UNSECURE_COMMANDS: true |
43 | | - - uses: ngduc/vercel-deploy-action@master |
44 | | - if: ${{ github.ref != 'refs/heads/main' }} |
45 | | - with: |
46 | | - vercel-cli: vercel |
47 | | - vercel-project-id: ${{ secrets.VERCEL_APP_PROJECT_ID}} |
48 | | - vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} |
49 | | - vercel-token: ${{ secrets.VERCEL_TOKEN }} |
50 | | - github-token: ${{ secrets.GITHUB_TOKEN }} |
51 | | - scope: ${{ secrets.VERCEL_ORG_ID }} |
52 | | - working-directory: packages/vscode-host/dist |
53 | | - vercel-args: "--target staging" |
54 | | - env: |
55 | | - ACTIONS_ALLOW_UNSECURE_COMMANDS: true |
56 | | - |
57 | | - # deploy entrypoint (no preview) |
58 | | - - uses: ngduc/vercel-deploy-action@master |
59 | | - if: ${{ github.ref == 'refs/heads/main' }} |
60 | | - with: |
61 | | - vercel-cli: vercel |
62 | | - vercel-project-id: ${{ secrets.VERCEL_ENTRYPOINT_PROJECT_ID}} |
63 | | - vercel-org-id: ${{ secrets.VERCEL_ORG_ID}} |
64 | | - vercel-token: ${{ secrets.VERCEL_TOKEN }} |
65 | | - scope: ${{ secrets.VERCEL_ORG_ID }} |
66 | | - working-directory: packages/entrypoint/dist |
67 | | - vercel-args: "--prod" |
68 | | - env: |
69 | | - ACTIONS_ALLOW_UNSECURE_COMMANDS: true |
0 commit comments