浏览代码

ci: deploy documents to minio (#936)

Signed-off-by: longjin <longjin@DragonOS.org>
LoGin 6 月之前
父节点
当前提交
2f9b18ba8e
共有 1 个文件被更改,包括 11 次插入1 次删除
  1. 11 1
      .github/workflows/docs-multiversion.yml

+ 11 - 1
.github/workflows/docs-multiversion.yml

@@ -25,7 +25,7 @@ jobs:
       working-directory: ./docs
       working-directory: ./docs
       run: |
       run: |
         sudo apt-get update
         sudo apt-get update
-        sudo apt-get install -y python3-pip
+        sudo apt-get install -y python3-pip awscli
         pip3 install -r requirements.txt
         pip3 install -r requirements.txt
 
 
     - name: build docs
     - name: build docs
@@ -34,3 +34,13 @@ jobs:
 
 
       run: |
       run: |
         make html-multiversion
         make html-multiversion
+
+    - name: deploy docs
+      working-directory: ./docs
+      env:
+        AWS_ENDPOINT_URL: ${{ secrets.DOCS_DEPLOY_S3_ENDPOINT_URL }}
+        AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_DEPLOY_S3_API_KEY }}
+        AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_DEPLOY_S3_SECRET_KEY }}
+      
+      run: |
+        aws s3 sync ./_build/html s3://dragonos-docs --delete