File tree Expand file tree Collapse file tree 1 file changed +35
-0
lines changed
Expand file tree Collapse file tree 1 file changed +35
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Deploy to Google Cloud Platform
2+ on :
3+ push :
4+ branches :
5+ - ' deploy'
6+ workflow_dispatch : # TODO: should be removed when the workflow is stable
7+
8+ jobs :
9+ deploy-to-vm :
10+ runs-on : ubuntu-latest # supporting Node 20
11+ permissions :
12+ contents : read
13+ id-token : write
14+
15+ steps :
16+ - uses : actions/checkout@v4
17+
18+ - id : ' auth'
19+ uses : google-github-actions/auth@v2
20+ with :
21+ project_id : ' deepgit'
22+ workload_identity_provider : ' projects/417733706772/locations/global/workloadIdentityPools/deployment/providers/github'
23+
24+ - id : ' compute-ssh'
25+ uses : ' google-github-actions/ssh-compute@v1'
26+ with :
27+ instance_name : ' instance-1'
28+ zone : ' us-central1-f'
29+ ssh_private_key : ' ${{ secrets.GCP_SSH_PRIVATE_KEY }}'
30+ command : ' echo Hello world'
31+
32+ - id : ' test'
33+ run : |-
34+ echo '${{ steps.compute-ssh.outputs.stdout }}'
35+ echo '${{ steps.compute-ssh.outputs.stderr }}'
You can’t perform that action at this time.
0 commit comments