chore(release): publish 0.9.1 #108
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy apps/official-website to Google Cloud Run | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'apps/official-website/**' | |
- 'packages/hooks/**' | |
- 'packages/viewer/**' | |
- 'package*.json' | |
- '.github/workflows/deploy-official-website.yaml' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
env: | |
GCR_HOSTNAME: gcr.io | |
GCP_PROJECT_ID: ${{ secrets.GCP_PROJECT_ID }} | |
IMAGE_NAME: official-website | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Authenticate to Google Cloud | |
uses: google-github-actions/auth@v2 | |
with: | |
credentials_json: '${{ secrets.GCP_CREDENTIALS }}' | |
- name: Log in to Google Container Registry | |
uses: docker/login-action@v3 | |
with: | |
registry: gcr.io | |
username: _json_key | |
password: '${{ secrets.GCP_CREDENTIALS }}' | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
file: ./apps/official-website/Dockerfile | |
push: true | |
tags: ${{ env.GCR_HOSTNAME }}/${{ env.GCP_PROJECT_ID }}/${{ env.IMAGE_NAME }}:${{ github.sha }} | |
cache-from: type=gha | |
cache-to: type=gha,mode=max | |
- name: Deploy to Cloud Run | |
uses: google-github-actions/deploy-cloudrun@v2 | |
with: | |
service: ${{ env.IMAGE_NAME }} | |
image: ${{ env.GCR_HOSTNAME }}/${{ env.GCP_PROJECT_ID }}/${{ env.IMAGE_NAME }}:${{ github.sha }} | |
region: us-central1 |