summaryrefslogtreecommitdiff
path: root/.github/workflows/deploy-digitalocean.yml
blob: 8b036aad1477774e0a9c800eddc4636cfd06ec85 (plain)
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
name: deploy-digitalocean

on:
  workflow_dispatch:
#   push:
#     branches: [ main ]
#     paths: kubernetes/*

jobs:
  deploy:
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      - name: Checkout repo
        uses: actions/checkout@v2

      - name: Install doctl
        uses: digitalocean/action-doctl@v2
        with:
          token: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}

      - name: Setup DigitalOcean kubeconfig
        run: doctl kubernetes cluster kubeconfig save bro-cluster
        
      - name: Deploy to DigitalOcean Kubernetes
        run: kubectl apply -f kubernetes/server.yml

      - name: Verify deployment
        run: kubectl rollout status deployment/seven-wonders
bgstack15