-
Notifications
You must be signed in to change notification settings - Fork 294
57 lines (47 loc) · 1.34 KB
/
docker-frontend-image.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
name: Deploy Front Docker
on:
push:
branches:
- master
paths:
- 'frontend/**'
pull_request:
branches:
- master
paths:
- 'frontend/**'
jobs:
deploy_front:
if: github.repository == 'ldurans/izing.open.io'
runs-on: ubuntu-22.04
environment: production
steps:
- name: "Checkout"
uses: actions/checkout@v4
- name: "Use NodeJS"
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Verify Node.js version
run: node -v
- name: Install Quasar CLI
run: npm install -g @quasar/cli
- name: Install dependencies
run: npm install
working-directory: ./frontend
- name: Build Frontend
run: |
cd frontend
export NODE_OPTIONS=--openssl-legacy-provider
npx quasar build -P -m pwa
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to Docker Hub
uses: docker/login-action@v2
with:
username: izingopenio
password: ${{ secrets.DOCKER_TOKEN }}
- name: Build and push Docker image
run: |
docker buildx create --use
docker buildx build --platform linux/amd64,linux/arm64 -t izingopenio/izingopenio-frontend:latest --push ./frontend