diff --git a/.gitea/workflows/update-docs.yml b/.gitea/workflows/update-docs.yml index eff9d35..c9e7331 100644 --- a/.gitea/workflows/update-docs.yml +++ b/.gitea/workflows/update-docs.yml @@ -85,7 +85,22 @@ jobs: deploy-container: runs-on: ubuntu-latest + needs: build-image steps: - - name: Temp - run: | - echo "TEMP" \ No newline at end of file + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: 'Deploy' + uses: deliverybot/helm@v1 + with: + release: spearhead-docs + namespace: spearhead-docs + chart: '.helm' + value-files: >- + [ + ".helm/values.yaml" + ] + env: + KUBECONFIG_FILE: ${{ secrets.KUBECONFIG_CONTENT }} diff --git a/.helm/templates/deployment.yaml b/.helm/templates/deployment.yaml index e69de29..40417d3 100644 --- a/.helm/templates/deployment.yaml +++ b/.helm/templates/deployment.yaml @@ -0,0 +1,24 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: ${{ .Values.app }} + labels: + app: ${{ .Values.app }} + namespace: spearhead-docs + +spec: + replicas: 1 + selector: + matchLabels: + app: ${{ .Values.app }} + template: + metadata: + labels: + app: ${{ .Values.app }} + spec: + containers: + - name: ${{ .Values.app }} + image: ${{ .Values.image.registry }}/${{ .Values.image.repository }}:${{ .Values.image.tag }} + ports: + - containerPort: ${{ .Values.ports.containerPort }} + \ No newline at end of file diff --git a/.helm/templates/ingress.yaml b/.helm/templates/ingress.yaml deleted file mode 100644 index e69de29..0000000 diff --git a/.helm/templates/network.yaml b/.helm/templates/network.yaml new file mode 100644 index 0000000..777d0e0 --- /dev/null +++ b/.helm/templates/network.yaml @@ -0,0 +1,31 @@ + +# apiVersion: v1 +# kind: Service + + + +# apiVersion: networking.k8s.io/v1 +# kind: Ingress +# metadata: +# name: docker-registry-ingress +# namespace: docker-registry +# annotations: +# cert-manager.io/cluster-issuer: "internal-ca-issuer" +# nginx.ingress.kubernetes.io/proxy-body-size: "0" +# spec: +# ingressClassName: nginx +# tls: +# - secretName: registry-tls +# hosts: +# - registry.dutchie031.net +# rules: +# - host: registry.dutchie031.net +# http: +# paths: +# - path: / +# pathType: Prefix +# backend: +# service: +# name: docker-registry +# port: +# number: 5000 \ No newline at end of file diff --git a/.helm/values.yaml b/.helm/values.yaml index e69de29..e51ab58 100644 --- a/.helm/values.yaml +++ b/.helm/values.yaml @@ -0,0 +1,11 @@ + + +app: spearhead-docs + +image: + registry: registry.dutchie031.net + repository: spearhead-docs + tag: latest + +ports: + containerPort: 80 \ No newline at end of file