forked from cp-algorithms/cp-algorithms
-
Notifications
You must be signed in to change notification settings - Fork 0
38 lines (33 loc) · 945 Bytes
/
deploy-cloud-function.yml
File metadata and controls
38 lines (33 loc) · 945 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: Deploy Cloud Function
on:
push:
branches:
- master
jobs:
deploy_cloud_function:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: changes
with:
filters: |
src:
- 'preview/**'
- id: 'auth'
uses: 'google-github-actions/auth@v0'
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: 'cp-algorithms@appspot.gserviceaccount.com'
entry_point: 'main'
source_dir: 'preview/'