-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (85 loc) · 2.64 KB
/
Copy pathdev.yml
File metadata and controls
98 lines (85 loc) · 2.64 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Dev
on:
push:
branches: [dev]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write
repository-projects: write
deployments: write
statuses: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Enable Corepack
run: corepack enable
- name: Setup Yarn cache
uses: actions/cache@v4
with:
path: |
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-${{ runner.os }}-
- name: Install dependencies
run: yarn install --immutable
- name: Deploy to Vercel
uses: amondnet/vercel-action@v20
with:
vercel-token: ${{ secrets.VERCEL_TOKEN }}
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORGID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECTID }}
vercel-args: --prod
playwright-cache:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
- name: Enable Corepack
run: corepack enable
- name: Setup Yarn cache
uses: actions/cache@v4
with:
path: |
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-${{ runner.os }}-
- name: Install dependencies
run: yarn install --immutable
- name: Get playwright version
shell: bash
run: |
echo "PLAYWRIGHT_VERSION=$(yarn info playwright --json | jq -r '.children.Version')" >> $GITHUB_OUTPUT
id: playwright-version
- name: Cache Playwright Browsers for Playwright's Version
uses: actions/cache@v4
with:
path: ~/.cache/ms-playwright
key: ${{ runner.os }}-playwright-${{ steps.playwright-version.outputs.PLAYWRIGHT_VERSION }}
restore-keys: |
${{ runner.os }}-playwright-
id: cache-playwright-browsers
- name: Setup Playwright
shell: bash
if: steps.cache-playwright-browsers.outputs.cache-hit != 'true'
run: yarn exec playwright install --with-deps