-
-
Notifications
You must be signed in to change notification settings - Fork 19
76 lines (73 loc) · 2.23 KB
/
deploys.yml
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
name: deploys
on:
push:
branches:
- main
jobs:
fetch:
runs-on: ubuntu-latest
env:
HIFUMIN_API_URL: ${{ secrets.HIFUMIN_API_URL }}
DATABASE_URL: ${{ secrets.DATABASE_URL }}
steps:
- name: checkout
uses: actions/checkout@v3
- name: bun
uses: oven-sh/setup-bun@v1
- name: install
run: bun i
- name: cache
uses: actions/cache@v3
with:
path: data
key: hentai-cache-v2-${{ secrets.CACHE_HASH }}-${{ hashFiles('src/core/constants/codes/**/*.ts') }}
restore-keys: |
hentai-cache-v2-${{ secrets.CACHE_HASH }}-${{ hashFiles('src/core/constants/codes/**/*.ts') }}
hentai-cache-v2-${{ secrets.CACHE_HASH }}-
- name: fetch
run: bun fetch:data
- name: sync
run: bun sync:data
build:
runs-on: ubuntu-latest
needs: [fetch]
env:
APP_NAME: riffyh-runtime-private
IMAGE_NAME: ghcr.io/rayriffy/riffyh-runtime-private
steps:
- name: checkout
uses: actions/checkout@v3
- name: cache
uses: actions/cache@v3
with:
path: data
key: hentai-cache-v2-${{ secrets.CACHE_HASH }}-${{ hashFiles('src/core/constants/codes/**/*.ts') }}
restore-keys: |
hentai-cache-v2-${{ secrets.CACHE_HASH }}-${{ hashFiles('src/core/constants/codes/**/*.ts') }}
hentai-cache-v2-${{ secrets.CACHE_HASH }}-
- name: login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: rayriffy
password: ${{ secrets.GITHUB_TOKEN }}
- name: buildx
uses: docker/setup-buildx-action@v2
- name: build-and-push
uses: docker/build-push-action@v3
with:
context: .
push: true
tags: ghcr.io/rayriffy/riffyh-runtime
- name: deploy
uses: deploys-app/deploys-action@v1
with:
project: rayriffy
location: gke.cluster-rcf2
name: riffy-h
image: ghcr.io/rayriffy/riffyh-runtime
minReplicas: 1
maxReplicas: 4
env:
DEPLOYS_AUTH_USER: ${{ secrets.DEPLOYS_AUTH_USER }}
DEPLOYS_AUTH_PASS: ${{ secrets.DEPLOYS_AUTH_PASS }}