Skip to content

Update mlops-poc.md #200

Update mlops-poc.md

Update mlops-poc.md #200

Workflow file for this run

name: CI
on: push
env:
PROJECT_ID: ${{ secrets.RUN_PROJECT }}
RUN_REGION: europe-west4
SERVICE_NAME: qawareblog
jobs:
deploy:
runs-on: ubuntu-20.04
steps:
- name: Git checkout
uses: actions/[email protected]
with:
submodules: true
- name: Setup hugo
uses: peaceiris/[email protected]
with:
hugo-version: "0.117.0"
extended: true
- name: Build
run: hugo -s . --config ./config.toml --minify --cleanDestinationDir
- name: Deploy
if: github.ref == 'refs/heads/master'
uses: peaceiris/[email protected]
with:
personal_token: ${{ secrets.TOKEN }}
external_repository: qaware/qaware.github.io
publish_dir: ./public
#keep_files: true
user_name: fuchshuber
user_email: [email protected]
publish_branch: master
cname: blog.qaware.de
# Setup gcloud CLI
- name: 'Setup Cloud Auth'
uses: 'google-github-actions/[email protected]'
with:
credentials_json: ${{ secrets.RUN_SA_KEY }}
- name: 'Set up Cloud SDK'
uses: 'google-github-actions/[email protected]'
with:
project_id: ${{ secrets.RUN_PROJECT }}
# Configure docker to use the gcloud command-line tool as a credential helper
- run: gcloud auth configure-docker
# Build the Docker image for staging environment
- name: Build
run: docker build --build-arg BASE_URL=https://qawareblog-zkop4aqvwa-ez.a.run.app/ --tag gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA .
# Push the Docker image to Google Container Registry
- name: Publish
run: docker push gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA
# Deploy the Docker image to Google Cloud Run
- name: Deploy
run: gcloud components install beta && gcloud beta run deploy $SERVICE_NAME --quiet --image gcr.io/$PROJECT_ID/$SERVICE_NAME:$GITHUB_SHA --project $PROJECT_ID --region $RUN_REGION --platform managed --allow-unauthenticated