-
Notifications
You must be signed in to change notification settings - Fork 362
53 lines (49 loc) · 1.64 KB
/
reviewstack.dev-deploy.yml
File metadata and controls
53 lines (49 loc) · 1.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
name: Deploy ReviewStack to Cloudflare Pages
on:
workflow_dispatch:
push:
branches:
- main
paths:
- 'eden/contrib/reviewstack/**'
- 'eden/contrib/reviewstack.dev/**'
- 'eden/contrib/shared/**'
- '.github/workflows/reviewstack.dev-deploy.yml'
jobs:
deploy:
runs-on: ubuntu-22.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'yarn'
cache-dependency-path: eden/contrib/yarn.lock
- name: Install dependencies
working-directory: ./eden/contrib/
run: yarn install
# Build codegen and then do some sanity checks so we don't push the site
# when the tests are broken.
- name: GraphQL/TextMate codegen
working-directory: ./eden/contrib/reviewstack
run: yarn codegen
- name: ESLint
working-directory: ./eden/contrib/reviewstack
run: yarn eslint
- name: Unit tests
working-directory: ./eden/contrib/reviewstack
run: yarn test --watchAll=false
- name: Build the static site
working-directory: ./eden/contrib/reviewstack.dev
run: yarn release
# Deploy to Cloudflare Pages
- name: Deploy to Cloudflare Pages
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy ./eden/contrib/reviewstack.dev/build --project-name=reviewstack