Skip to content

word

word #28

Workflow file for this run

name: Build and Deploy SysBio portal
on:
push:
tags:
- "sysbio_*"
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "16"
- name: Install dependencies
run: npm install --no-audit --progress=false
- name: Extract tag name
id: get_tag
run: echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Build project
env:
VUE_CLI_SERVICE_CONFIG_PATH: "./configs/vue.config.SysBio.js"
VUE_APP_GA4_ID: ${{ secrets.VUE_APP_GA4_ID_SYSBIO }}
run: npm run deploy
# - name: Deploy to target repository
# uses: JamesIves/github-pages-deploy-action@v4
# with:
# folder: portals/SysBio
# token: ${{ secrets.DEPLOY_SYSBIO_TOKEN }}
# repository-name: broadinstitute/sysbio
# branch: main
# clean: true
# commit-message: "Deploying SysBio portal (${{ env.TAG_NAME }})"
# single-commit: true
# tag: ${{ env.TAG_NAME }}
# Google Cloud Run deployment steps
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}
project_id: ${{ secrets.GCP_PROJECT_ID }}
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
# Configure Docker for Artifact Registry (specifying the region)
- name: Configure Docker for Artifact Registry
run: gcloud auth configure-docker ${{ secrets.GCP_REGION }}-docker.pkg.dev --quiet
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
push: true
tags: ${{ secrets.GCP_REGION }}-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/sysbio-docker/sysbio-portal:${{ env.TAG_NAME }},${{ secrets.GCP_REGION }}-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/sysbio-docker/sysbio-portal:latest
build-args: |
BUILD_PATH=portals/SysBio
file: .github/workflows/nginx.Dockerfile
# Temporarily disable cache to identify if it's causing the issue
no-cache: true
- name: Deploy to Cloud Run
uses: google-github-actions/deploy-cloudrun@v2
with:
service: sysbio-portal
image: ${{ secrets.GCP_REGION }}-docker.pkg.dev/${{ secrets.GCP_PROJECT_ID }}/sysbio-docker/sysbio-portal:${{ env.TAG_NAME }}
region: ${{ secrets.GCP_REGION }}
flags: --allow-unauthenticated