This repository has been archived by the owner on May 1, 2024. It is now read-only.
Add WebSocket to gradle #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build And Deploy | |
on: | |
push: | |
branches: [ "main" ] | |
permissions: | |
contents: read | |
packages: write | |
jobs: | |
build: | |
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: Build the frontend | |
run: | | |
just fe_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 and push frontend docker image | |
run: | | |
pushd frontend | |
docker build -t ghcr.io/mosquito-bytes/carbon-criters-frontend:latest . | |
docker push ghcr.io/mosquito-bytes/carbon-criters-frontend:latest | |
popd |