Skip to content

deploy

deploy #32

Workflow file for this run

name: Deploy to Google Cloud
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Java
uses: actions/setup-java@v1
with:
java-version: '11'
- name: Authenticate with Google Cloud
run: echo '${{ secrets.GCP_SA_KEY }}' > "$HOME/gcp-key.json"
- name: Find Maven project directory
run: |
echo "Current directory:"
pwd
echo "List of directories containing pom.xml:"
find . -name pom.xml -exec dirname {} \;
- name: Activate service account credentials
run: gcloud auth activate-service-account --key-file="$HOME/gcp-key.json"
- name: Change directory and deploy
run: |
cd "$project_dir"
mvn clean package appengine:deploy