Skip to content

Update main.yml

Update main.yml #55

Workflow file for this run

name: Deploy
on:
push:
branches:
- master
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build React
run: |
git submodule update --init --recursive
- name: Install Java
uses: actions/setup-java@v2
with:
java-version: 17
java-package: jdk
architecture: x64
check-latest: false
server-id: github
server-username: GITHUB_ACTOR
server-password: GITHUB_TOKEN
overwrite-settings: true
job-status: success
distribution: adopt
- name: Build Project(without test)
run: |
./gradlew clean build -x test
- name: Publish app to Google App Engine
uses: zxyle/[email protected]
with:
service_account_email: ${{ secrets.GCP_SA_EMAIL }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ secrets.PROJECT_ID }}
- name: Deploy Project
run: |
echo '${{ secrets.GCP_SA_KEY }}' > key.json
cat key.json
gcloud auth activate-service-account --key-file=key.json --verbosity=debug
gcloud config set project ${{ secrets.PROJECT_ID }}
gcloud app deploy ./build/libs/rank-system-2.0.0-SNAPSHOT.jar --version=v2 --quiet