build: mc
All checks were successful
Build and Deploy to MinIO / build-and-deploy (push) Successful in 6m20s
All checks were successful
Build and Deploy to MinIO / build-and-deploy (push) Successful in 6m20s
This commit is contained in:
@@ -53,18 +53,23 @@ jobs:
|
||||
|
||||
- name: Configure MinIO client
|
||||
env:
|
||||
MINIO_REPOSITORY: ${{ secrets.MINIO_REPOSITORY }}
|
||||
MINIO_ACCESS_KEY: ${{ secrets.MINIO_ACCESS_KEY }}
|
||||
MINIO_SECRET_KEY: ${{ secrets.MINIO_SECRET_KEY }}
|
||||
run: |
|
||||
mc alias set storage https://storage.opytex.org $MINIO_ACCESS_KEY $MINIO_SECRET_KEY
|
||||
mc alias set storage $MINIO_REPOSITORY $MINIO_ACCESS_KEY $MINIO_SECRET_KEY
|
||||
|
||||
- name: Deploy to MinIO - Master branch
|
||||
env:
|
||||
MINIO_BUCKET: ${{ secrets.MINIO_BUCKET }}
|
||||
if: gitea.ref == 'refs/heads/master'
|
||||
run: |
|
||||
mc mirror --overwrite ./output/ storage/opytex.org/
|
||||
mc mirror --overwrite --exclude "enseignements/*" ./output/ storage/$MINIO_BUCKET
|
||||
|
||||
- name: Deploy to MinIO - Year branches
|
||||
env:
|
||||
MINIO_BUCKET: ${{ secrets.MINIO_BUCKET }}
|
||||
if: gitea.ref != 'refs/heads/master'
|
||||
run: |
|
||||
BRANCH_NAME=${GITEA_REF_NAME}
|
||||
mc mirror --overwrite --remove ./output/ storage/opytex.org/enseignements/${BRANCH_NAME}/
|
||||
mc mirror --overwrite --remove ./output/ storage/$MINIO_BUCKET/enseignements/${BRANCH_NAME}/
|
||||
|
Reference in New Issue
Block a user