Skip to content

Commit

Permalink
deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
JakinRogel committed Apr 7, 2024
1 parent 0c291af commit f254319
Showing 1 changed file with 12 additions and 26 deletions.
38 changes: 12 additions & 26 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,23 @@
name: Deploy to Google Cloud

on:
push:
branches:
- main

jobs:
deploy:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Java
- name: Set up Java JDK
uses: actions/setup-java@v1
with:
java-version: '11'
java-version: 11

- name: Authenticate with Google Cloud
run: echo '${{ secrets.GCP_SA_KEY }}' > "$HOME/gcp-key.json"
- name: Install Maven
run: sudo apt-get install -y maven

- 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
- name: Authenticate with Google Cloud
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
- name: List contents of project directory
run: ls -la "$project_dir"

- name: Build and deploy with Maven
run: mvn clean package appengine:deploy

0 comments on commit f254319

Please sign in to comment.