From 61602870134465aec44645d42f317d97ae6b2e7e Mon Sep 17 00:00:00 2001 From: james-otten Date: Sat, 3 Aug 2024 20:49:46 -0400 Subject: [PATCH] deploy scp --- .github/workflows/deploy.yaml | 44 +++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 18 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index d59fb15..5d3bb84 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -35,15 +35,19 @@ jobs: - name: Install Helm Chart run: | - ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_TARGET_IP }} "\ - sudo bash -c '\ - helm install -f ./bookstack-helm/values.yaml wiki ./bookstack-helm \ - --set bookstack.db.username=\"${{ secrets.DB_USERNAME }}\" \ - --set bookstack.db.password=\"${{ secrets.DB_PASSWORD }}\" \ - --set bookstack.db.root_password=\"${{ secrets.ROOT_PASSWORD }}\" \ - --set bookstack.mail.username=\"${{ secrets.MAIL_USERNAME }}\" \ - --set bookstack.mail.password=\"${{ secrets.MAIL_PASSWORD }}\" \ - '" + scp ${{ secrets.SSH_USER }}@${{ secrets.SSH_TARGET_IP }}:~/.kube/config ./ + helm install \ + --kube-apiserver ${{ secrets.SSH_TARGET_IP }}:6443 \ + -n ${{ vars.APP_NAMESPACE }} \ + --create-namespace \ + wiki \ + bookstack-helm + -f ./bookstack-helm/values.yaml \ + --set bookstack.db.username=\"${{ secrets.DB_USERNAME }}\" \ + --set bookstack.db.password=\"${{ secrets.DB_PASSWORD }}\" \ + --set bookstack.db.root_password=\"${{ secrets.ROOT_PASSWORD }}\" \ + --set bookstack.mail.username=\"${{ secrets.MAIL_USERNAME }}\" \ + --set bookstack.mail.password=\"${{ secrets.MAIL_PASSWORD }}\" deploy_to_prod1: name: Deploy to prod 1 @@ -73,12 +77,16 @@ jobs: - name: Install Helm Chart run: | - ssh ${{ secrets.SSH_USER }}@${{ secrets.SSH_TARGET_IP }} "\ - sudo bash -c '\ - helm install -f ./bookstack-helm/values.yaml wiki ./bookstack-helm \ - --set bookstack.db.username=\"${{ secrets.DB_USERNAME }}\" \ - --set bookstack.db.password=\"${{ secrets.DB_PASSWORD }}\" \ - --set bookstack.db.root_password=\"${{ secrets.ROOT_PASSWORD }}\" \ - --set bookstack.mail.username=\"${{ secrets.MAIL_USERNAME }}\" \ - --set bookstack.mail.password=\"${{ secrets.MAIL_PASSWORD }}\" \ - '" + scp ${{ secrets.SSH_USER }}@${{ secrets.SSH_TARGET_IP }}:~/.kube/config ./ + helm install \ + --kube-apiserver ${{ secrets.SSH_TARGET_IP }}:6443 \ + -n ${{ vars.APP_NAMESPACE }} \ + --create-namespace \ + wiki \ + bookstack-helm + -f ./bookstack-helm/values.yaml \ + --set bookstack.db.username=\"${{ secrets.DB_USERNAME }}\" \ + --set bookstack.db.password=\"${{ secrets.DB_PASSWORD }}\" \ + --set bookstack.db.root_password=\"${{ secrets.ROOT_PASSWORD }}\" \ + --set bookstack.mail.username=\"${{ secrets.MAIL_USERNAME }}\" \ + --set bookstack.mail.password=\"${{ secrets.MAIL_PASSWORD }}\"