-
-
Notifications
You must be signed in to change notification settings - Fork 126
69 lines (55 loc) · 1.43 KB
/
web.yaml
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
on:
push:
paths: ['apps/web/**', '.github/workflows/web.yaml']
pull_request:
paths: ['apps/web/**']
jobs:
validate:
runs-on: ubuntu-latest
name: Validate
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: 8
run_install: false
- name: Install packages
run: |
pnpm i
- name: Lint
run: |
pnpm run lint:web
- name: Test
run: |
pnpm run test:web
build:
needs: validate
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
name: Build and push docker image
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Login to Docker Hub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build Docker image
run: docker build -t keyshade/keyshade-web:latest -f Dockerfile-web .
- name: Push Docker image
run: docker push keyshade/keyshade-web
deploy:
needs: build
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
name: Deploy to Render
steps:
- name: deploy
run: curl ${{ secrets.RENDER_WEB_DEPLOY_HOOK }}