Skip to content

Commit 753df8e

Browse files
refactor(ci): migrate to reusable k8s actions
1 parent 4faaa7a commit 753df8e

File tree

4 files changed

+55
-272
lines changed

4 files changed

+55
-272
lines changed

.github/workflows/k8s-deploy.yml

Lines changed: 0 additions & 234 deletions
This file was deleted.

.github/workflows/k8s-destroy.yml

Lines changed: 0 additions & 38 deletions
This file was deleted.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: 'Preview: Deploy'
2+
3+
on:
4+
pull_request:
5+
branches: [ develop ]
6+
types: [ opened, reopened, synchronize ]
7+
push:
8+
branches: [ develop ]
9+
10+
concurrency:
11+
group: preview-${{ github.head_ref }}
12+
cancel-in-progress: true
13+
14+
permissions:
15+
contents: write
16+
packages: write
17+
deployments: write
18+
19+
jobs:
20+
preview-deploy:
21+
runs-on: ubuntu-latest
22+
steps:
23+
24+
- uses: EmergencePlatform/php-runtime@github-actions/deploy-site-preview/v1
25+
id: deploy-site-preview
26+
with:
27+
github-token: ${{ secrets.GITHUB_TOKEN }}
28+
kube-config: ${{ secrets.KUBECONFIG_BASE64 }}
29+
kube-namespace: code-for-philly
30+
kube-hostname: codeforphilly.sandbox.k8s.phl.io
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: 'Preview: Destroy'
2+
3+
on:
4+
pull_request:
5+
branches: [ develop ]
6+
types: [ closed ]
7+
8+
concurrency:
9+
group: preview-${{ github.head_ref }}
10+
cancel-in-progress: true
11+
12+
permissions:
13+
deployments: write
14+
15+
jobs:
16+
preview-destroy:
17+
runs-on: ubuntu-latest
18+
steps:
19+
20+
- uses: EmergencePlatform/php-runtime@github-actions/destroy-site-preview/v1
21+
id: destroy-site-preview
22+
with:
23+
github-token: ${{ secrets.GITHUB_TOKEN }}
24+
kube-config: ${{ secrets.KUBECONFIG_BASE64 }}
25+
kube-namespace: code-for-philly

0 commit comments

Comments
 (0)