Merge pull request #1547 from 100daysummer/patch-2 #527
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 Cloud Function | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| deploy_cloud_function: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v2 | |
| id: changes | |
| with: | |
| filters: | | |
| src: | |
| - 'preview/**' | |
| - id: 'auth' | |
| uses: 'google-github-actions/[email protected]' | |
| with: | |
| credentials_json: '${{ secrets.GCP_CREDENTIALS }}' | |
| - id: 'deploy' | |
| if: steps.changes.outputs.src == 'true' | |
| uses: 'google-github-actions/deploy-cloud-functions@v0' | |
| with: | |
| project_id: 'cp-algorithms' | |
| region: 'us-central1' | |
| name: 'convert-markdown-mkdocs' | |
| runtime: 'python37' | |
| memory_mb: '1024' | |
| service_account_email: '[email protected]' | |
| entry_point: 'main' | |
| source_dir: 'preview/' |