diff --git a/.gitea/workflows/publish.yaml b/.gitea/workflows/publish.yaml index e170be9..6391e00 100644 --- a/.gitea/workflows/publish.yaml +++ b/.gitea/workflows/publish.yaml @@ -36,5 +36,7 @@ jobs: run: mkdir ~/.kube && echo "${{ secrets.K8S_CONF }}" > ~/.kube/config - name: Get target pods's name run: echo "TARGET_POD=$(kubectl get pods -n my-stuff -l app=digital-garden -o json | jq -r .items[0].metadata.name)" >> "$GITHUB_ENV" - - name: Copy contents to PVC - run: kubectl cp content my-stuff/$TARGET_POD:/www/data/ + - name: Copy contents to pod temp folder (due to permission issues) + run: kubectl cp content my-stuff/$TARGET_POD:/tmp + - name: Change permissions and move files to WWW directory + run: kubectl exec -it my-stuff/$TARGET_POD -- chown -R root:root /tmp/content && mv /tmp/content /www/data