-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (35 loc) · 1.06 KB
/
deploy_gcp.yml
File metadata and controls
40 lines (35 loc) · 1.06 KB
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
39
40
name: Deploy to Google Cloud Platform
on:
push:
branches:
- 'deploy'
pull_request:
branches:
- 'deploy'
workflow_dispatch: # TODO: should be removed when the workflow is stable
jobs:
deploy-to-vm:
runs-on: ubuntu-latest # supporting Node 20
permissions:
contents: read
id-token: write
steps:
- uses: actions/checkout@v4
- id: 'auth'
uses: google-github-actions/auth@v2
with:
project_id: 'deepgit'
workload_identity_provider: 'projects/417733706772/locations/global/workloadIdentityPools/deployment/providers/github'
- id: 'compute-ssh'
uses: 'google-github-actions/ssh-compute@v1'
with:
instance_name: 'instance-1'
project_id: 'deepgit'
user: "user"
zone: 'us-central1-f'
ssh_private_key: '${{ secrets.GCP_SSH_PRIVATE_KEY }}'
command: 'echo Hello world'
- id: 'test'
run: |-
echo '${{ steps.compute-ssh.outputs.stdout }}'
echo '${{ steps.compute-ssh.outputs.stderr }}'