ci(frontend): fixing deploying to kubernetes
Signed-off-by: Rajesh Rajendran <rjshrjndrn@gmail.com>
This commit is contained in:
parent
f7941c31a2
commit
3f2eec37f7
1 changed files with 12 additions and 16 deletions
28
.github/workflows/frontend.yaml
vendored
28
.github/workflows/frontend.yaml
vendored
|
|
@ -22,26 +22,22 @@ jobs:
|
|||
${{ runner.OS }}-build-
|
||||
${{ runner.OS }}-
|
||||
|
||||
- uses: azure/k8s-set-context@v1
|
||||
with:
|
||||
method: kubeconfig
|
||||
kubeconfig: ${{ secrets.OSS_KUBECONFIG }} # Use content of kubeconfig in secret.
|
||||
id: setcontext
|
||||
- name: Install
|
||||
run: npm install
|
||||
|
||||
- name: Build
|
||||
run: npm run build:staging
|
||||
env:
|
||||
ENVIRONMENT: staging
|
||||
|
||||
- name: Deploy
|
||||
env:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: eu-central-1
|
||||
AWS_S3_BUCKET_NAME: ${{ secrets.AWS_S3_BUCKET_NAME }}
|
||||
- name: Build and deploy
|
||||
run: |
|
||||
aws configure set default.s3.signature_version s3v4
|
||||
aws --endpoint-url https://${{secrets.DOMAIN_NAME}}/frontend/ s3 cp \
|
||||
--recursive \
|
||||
--region "$AWS_REGION" \
|
||||
public s3://$AWS_S3_BUCKET_NAME
|
||||
cd frontend
|
||||
bash build.sh
|
||||
cp -arl public frontend
|
||||
minio_pod=$(kubectl get po -n db -l app.kubernetes.io/name=minio -n db --output custom-columns=name:.metadata.name | tail -n+2)
|
||||
kubectl -n db cp frontend $minio_pod:/data/
|
||||
rm -rf frontend
|
||||
|
||||
# - name: Debug Job
|
||||
# if: ${{ failure() }}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue