Skip to content

deploy-server-nightly #221

deploy-server-nightly

deploy-server-nightly #221

name: deploy-server-nightly
on:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
env:
IMAGE: reearth/reearth-visualizer-api:nightly
IMAGE_GCP: us-central1-docker.pkg.dev/reearth-oss/reearth/reearth-visualizer-api:nightly
GCP_REGION: asia-northeast1
jobs:
deploy_test:
name: Deploy app to test env
runs-on: ubuntu-latest
if: github.event.repository.full_name == 'reearth/reearth-visualizer'
steps:
- uses: google-github-actions/auth@v0
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v0
- name: Configure docker
run: gcloud auth configure-docker us-central1-docker.pkg.dev --quiet
- name: docker push
run: |
docker pull $IMAGE
docker tag $IMAGE $IMAGE_GCP
docker push $IMAGE_GCP
- name: Deploy to Cloud Run
run: |
gcloud run deploy reearth-visualizer-api \
--image $IMAGE_GCP \
--region $GCP_REGION \
--platform managed \
--quiet