heroicon issue resolved #20
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 ForestFeed WebApp to GCR | |
on: | |
push: | |
branches: | |
- dev | |
- main | |
env: | |
PROJECT_ID: ${{ secrets.GCR_PROJECT }} | |
RUN_REGION: ${{ secrets.GCR_REGION }} | |
SERVICE_NAME: ff-webdev | |
jobs: | |
deploy-gcr: | |
name: Deploy ForestFeed to GCR - DEV | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Repo | |
uses: actions/checkout@main | |
- id: 'auth' | |
uses: 'google-github-actions/auth@v1' | |
with: | |
credentials_json: '${{ secrets.GCR_SA_KEY }}' | |
project_id: '${{ secrets.GCR_PROJECT }}' | |
- name: 'Set up Cloud SDK' | |
uses: 'google-github-actions/setup-gcloud@v1' | |
- name: create env file | |
run: | | |
echo '${{ secrets.ALL_ENV }}' > .env.local | |
- name: 'Docker build' | |
run: 'docker build -t gcr.io/$PROJECT_ID/${{ env.SERVICE_NAME }}:$GITHUB_SHA -f ./.docker/prod.Dockerfile .' | |
- name: 'Gcloud auth configure-docker' | |
run: 'gcloud auth configure-docker' | |
- name: 'Docker push to GCR' | |
run: 'docker push gcr.io/$PROJECT_ID/${{ env.SERVICE_NAME }}:$GITHUB_SHA' | |
- name: Deploy to Cloud Run | |
id: deploy | |
uses: google-github-actions/deploy-cloudrun@v1 | |
with: | |
service: ${{ env.SERVICE_NAME }} | |
region: ${{ env.RUN_REGION }} | |
image: 'gcr.io/${{ env.PROJECT_ID }}/${{ env.SERVICE_NAME }}:${{ github.sha }}' | |