Skip to content

Commit

Permalink
Create new workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
deploybot2311[bot] authored Feb 23, 2024
1 parent a4e3390 commit 8af1f3d
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Docker-CI/CD

on:
push:
branches:
- main
- soc
pull_request:
branches:
- main
- soc
jobs:
deploy:
runs-on: ubuntu-latest

env:
CI: false

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Run Docker Compose
run: |
cp .env.example .env
docker-compose -f docker-compose.yml up -d
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}

- name: Set up gcloud CLI
uses: google-github-actions/auth@v2
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}

- name: SSH into the VM
run:
gcloud compute ssh ${{ secrets.GCP_INSTANCE_NAME}} --zone=${{ secrets.GCP_ZONE }} --command "rmdir SkillWell"

0 comments on commit 8af1f3d

Please sign in to comment.