-
-
Notifications
You must be signed in to change notification settings - Fork 9
56 lines (48 loc) · 1.65 KB
/
Publish.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
name: Publish
on:
push:
branches:
- main
jobs:
build-and-deploy:
name: Build and deploy
runs-on: ubuntu-24.04
steps:
- name: Retrieve source code
uses: actions/checkout@v4
- name: Build and publish Docker Image for UI
uses: openzim/docker-publish-action@v10
with:
image-name: openzim/zimit-frontend-ui
on-master: latest
restrict-to: openzim/zimit-frontend
registries: ghcr.io
dockerfile: Dockerfile-ui
# prettier-ignore
credentials:
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }}
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }}
- name: Build and publish Docker Image for API
uses: openzim/docker-publish-action@v10
with:
image-name: openzim/zimit-frontend-api
on-master: latest
restrict-to: openzim/zimit-frontend
registries: ghcr.io
dockerfile: Dockerfile-api
# prettier-ignore
credentials:
GHCRIO_USERNAME=${{ secrets.GHCR_USERNAME }}
GHCRIO_TOKEN=${{ secrets.GHCR_TOKEN }}
- name: Deploy Zimit frontend UI changes to zimit.kiwix.org
uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.ZIMIT_KUBE_CONFIG }}
with:
args: rollout restart deployments zimit-frontend-ui-deployment -n zimit
- name: Deploy Zimit frontend API changes to zimit.kiwix.org
uses: actions-hub/kubectl@master
env:
KUBE_CONFIG: ${{ secrets.ZIMIT_KUBE_CONFIG }}
with:
args: rollout restart deployments zimit-frontend-api-deployment -n zimit