This repository has been archived by the owner on May 1, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (57 loc) · 1.55 KB
/
build.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
name: Build And Deploy
on:
push:
branches: [ "main" ]
permissions:
contents: read
packages: write
pages: write
id-token: write
jobs:
build:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: extractions/setup-just@v1
- name: Set up JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 18
- name: Build the backend
uses: gradle/gradle-build-action@v2
with:
build-root-directory: backend
arguments: build
- name: Docker login
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push backend docker image
run: |
pushd backend
docker build -t ghcr.io/mosquito-bytes/carbon-criters-backend:latest .
docker push ghcr.io/mosquito-bytes/carbon-criters-backend:latest
popd
- name: Build the frontend
run: |
just fe_build
- name: Configure GitHub Pages
uses: actions/configure-pages@v3
- name: Upload static resources artifact
uses: actions/upload-pages-artifact@v2
with:
path: frontend/packages/app/dist/
- name: Deploy the frontend to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2