Add Alibaba Cloud container image push functionality to CI workflow (… #2
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 Documentation | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - "docs/**" | |
| - ".github/workflows/doc-deploy.yml" | |
| env: | |
| LAF_CI_DOCS_PREVIEW_PAT: ${{ secrets.LAF_CI_DOCS_PREVIEW_PAT }} | |
| LAF_CI_DOCS_PREVIEW_APPID: ${{ secrets.LAF_CI_DOCS_PREVIEW_APPID }} | |
| LAF_CI_DOCS_PREVIEW_API_URL: ${{ secrets.LAF_CI_DOCS_PREVIEW_API_URL }} | |
| jobs: | |
| deploy-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Build Docs | |
| uses: ./.github/actions/build-docs | |
| - name: Setup laf-cli | |
| run: npm i laf-cli -g | |
| - name: Login laf-cli | |
| run: | | |
| laf user add doc -r ${{ env.LAF_CI_DOCS_PREVIEW_API_URL }} | |
| laf user switch doc | |
| laf login ${{ env.LAF_CI_DOCS_PREVIEW_PAT }} | |
| laf app init ${{ env.LAF_CI_DOCS_PREVIEW_APPID }} | |
| - name: Deploy to production bucket | |
| run: | | |
| # Deploy to production docs bucket | |
| laf storage push -f production-docs docs/.vitepress/dist/ |