fix: 图片调整 #60
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Deploy dongtai website v3 | |
| on: | |
| release: | |
| types: ["created"] | |
| push: | |
| branches: ["main"] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v2 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v2 | |
| - name: Login to DockerHub | |
| uses: docker/login-action@v2 | |
| with: | |
| username: ${{ secrets.DONGTAI_DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DONGTAI_DOCKERHUB_TOKEN }} | |
| - name: Build hugo static files | |
| uses: klakegg/actions-hugo@1.0.0 | |
| - name: Setup Ossutil | |
| uses: manyuanrong/setup-ossutil@v2.0 | |
| with: | |
| endpoint: ${{ secrets.DONGTAI_OSS_ENDPOINT }} | |
| access-key-id: ${{ secrets.DONGTAI_OSS_ACCESS_KEY_ID }} | |
| access-key-secret: ${{ secrets.DONGTAI_OSS_ACCESS_KEY_SECRET }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v3 | |
| with: | |
| context: . | |
| platforms: linux/amd64,linux/arm64 | |
| push: true | |
| tags: | | |
| dongtai/dongtai-website-v3:0.0.${{github.run_number}} | |
| dongtai/dongtai-website-v3:latest | |
| - name: Deploy dongtai-website-v3 | |
| uses: wahyd4/kubectl-helm-action@master | |
| env: | |
| KUBE_CONFIG_DATA: ${{ secrets.KUBE_CONFIG_DATA }} | |
| with: | |
| args: | | |
| find .github/deploy/deploy-dongtai-website.yml -type f -exec sed -i 's/VERSION/0.0.${{github.run_number}}/g' {} \; | |
| ls .github/deploy/deploy-dongtai-website.yml | xargs -I {} kubectl apply -f {} | |
| - name: Upload static file to oss | |
| run: | | |
| ossutil cp -rf public/ oss://dongtai-huoxian-cn/ |