Skip to content

Commit 2b9db5a

Browse files
authored
Auto refresh Sphinx containers (#49)
1 parent f0c6318 commit 2b9db5a

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

.github/workflows/on-push.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
1919
run: |
2020
source <(curl -sL http://ci.q-ctrl.com)
21-
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
21+
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
2222
./ci docker run qctrl/python-build:3.7 /scripts/housekeeping.sh
2323
2424
linting:
@@ -88,6 +88,14 @@ jobs:
8888
-u $(cat .hub_user) \
8989
-p $(cat .hub_pass) \
9090
qctrl/python-open-controls-docs:development
91+
- name: Update Sphinx deployment in Kubernetes (Development)
92+
run: |
93+
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
94+
./ci vault gcpKey -t $(cat .token) --proj q-ctrl-documentation -r docs -o ./gcloud-service-key.json
95+
gcloud auth activate-service-account --key-file=./gcloud-service-key.json
96+
gcloud config set project q-ctrl-documentation
97+
gcloud container clusters get-credentials docs-dev --zone us-central1-c
98+
kubectl -n docs-dev delete pod -l app=python-open-controls-docs
9199
92100
sphinx_documentation_test:
93101
if: github.ref != 'refs/heads/master'

.github/workflows/on-release.yml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,12 @@ jobs:
4545
./ci docker push \
4646
-u $(cat .hub_user) \
4747
-p $(cat .hub_pass) \
48-
qctrl/python-open-controls-docs:latest
48+
qctrl/python-open-controls-docs:latest
49+
- name: Update Sphinx deployment in Kubernetes (Production)
50+
run: |
51+
./ci vault login -r ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }}
52+
./ci vault gcpKey -t $(cat .token) --proj q-ctrl-documentation -r docs -o ./gcloud-service-key.json
53+
gcloud auth activate-service-account --key-file=./gcloud-service-key.json
54+
gcloud config set project q-ctrl-documentation
55+
gcloud container clusters get-credentials docs-prod --zone us-central1-c
56+
kubectl -n docs delete pod -l app=python-open-controls-docs

0 commit comments

Comments
 (0)