Merge pull request #339 from drivecore/feature/338-message-compaction #13
This file contains hidden or 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 Documentation to Cloud Run | |
on: | |
push: | |
branches: | |
- docs-release | |
- release | |
workflow_dispatch: | |
env: | |
REGION: us-central1 | |
GAR_HOSTNAME: us-central1-docker.pkg.dev | |
PROJECT_ID: drivecore-primary | |
SERVICE_NAME: mycoder-docs | |
jobs: | |
deploy: | |
name: Deploy to Cloud Run | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
id-token: write | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: google-github-actions/auth@v2 | |
with: | |
credentials_json: ${{ secrets.GCP_SA_KEY }} | |
- uses: google-github-actions/setup-gcloud@v2 | |
- run: gcloud auth configure-docker $GAR_HOSTNAME --quiet | |
- run: echo "IMAGE_PATH=$GAR_HOSTNAME/$PROJECT_ID/shared-docker-registry/$SERVICE_NAME:${{ github.sha }}" >> $GITHUB_ENV | |
- run: | | |
docker build -t ${{ env.IMAGE_PATH }} -f ./packages/docs/Dockerfile . | |
docker push ${{ env.IMAGE_PATH }} | |
- uses: google-github-actions/deploy-cloudrun@v2 | |
with: | |
service: ${{ env.SERVICE_NAME }} | |
region: ${{ env.REGION }} | |
image: ${{ env.IMAGE_PATH }} | |
flags: '--allow-unauthenticated' |