-
Notifications
You must be signed in to change notification settings - Fork 3
82 lines (77 loc) · 2.12 KB
/
deployment.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
77
78
79
80
81
82
name: Deployments
on:
push:
branches: [main]
workflow_dispatch:
permissions:
id-token: write
packages: write
pages: write
concurrency:
group: deploy
cancel-in-progress: true
jobs:
containers:
name: ${{ matrix.context }}
runs-on: ubuntu-latest
strategy:
matrix:
context: [web, cms]
steps:
- name: checkout
uses: actions/checkout@v3
- name: buildx
uses: docker/setup-buildx-action@v2
- name: login
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: build
uses: docker/build-push-action@v4
with:
file: Dockerfile.${{ matrix.context }}
push: true
tags: ghcr.io/${{ github.repository }}-${{ matrix.context }}
- name: publish
uses: deploys-app/deploys-action@v1
with:
project: ${{ secrets.DEPLOYS_NAME }}
location: gke.cluster-rcf2
name: hackth-${{ matrix.context }}
image: ghcr.io/${{ github.repository }}-${{ matrix.context }}
minReplicas: 1
maxReplicas: 2
env:
DEPLOYS_AUTH_USER: ${{ secrets.DEPLOYS_AUTH_USER }}
DEPLOYS_AUTH_PASS: ${{ secrets.DEPLOYS_AUTH_PASS }}
storybook:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v3
- name: pnpm
uses: pnpm/action-setup@v2
with:
version: 8
- name: node
uses: actions/setup-node@v3
with:
node-version: 18
cache: pnpm
- name: install
run: pnpm -r i --frozen-lockfile
- name: build
run: pnpm build --scope=@hackth/storybook
- name: configure
uses: actions/configure-pages@v3
- name: upload
uses: actions/upload-pages-artifact@v1
with:
path: apps/storybook/storybook-static
- name: deploy
id: deployment
uses: actions/deploy-pages@v2
- name: 'logging'
run: echo "Deployed at ${{ steps.deployment.outputs.page_url }}"