Update google-cloudrun-docker.yml #14
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 Angular Blog to Cloud Run | |
| on: | |
| push: | |
| branches: | |
| - main # lub inna gałąź, którą używasz do produkcji | |
| jobs: | |
| deploy: | |
| name: Build and Deploy | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Build Angular app | |
| run: npm run build --prod | |
| - name: Authenticate to Google Cloud | |
| uses: google-github-actions/auth@v2 | |
| with: | |
| credentials_json: '${{ secrets.GCP_SA_KEY }}' | |
| - name: Deploy to Cloud Run using Buildpacks | |
| uses: google-github-actions/deploy-cloudrun@v2 | |
| with: | |
| service: angular-blog # nazwa Twojej usługi Cloud Run | |
| region: europe-central2 # dopasuj do regionu | |
| source: . |