chore: release v2.0.1 - update xMarkdown and ConfigProvider badges to… #24
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: Docs CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - updata-2602 | |
| concurrency: | |
| group: docs-ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| build-docs: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Install pnpm | |
| run: | | |
| corepack enable | |
| corepack prepare pnpm@10.6.5 --activate | |
| - name: Install dependencies | |
| run: pnpm install | |
| - name: Resolve docs env | |
| id: docs_env | |
| run: | | |
| if [[ "${GITHUB_REF_NAME}" == "updata-2602" ]]; then | |
| echo "LINE=v2" >> $GITHUB_OUTPUT | |
| echo "PUBLIC_ORIGIN=https://v2.element-plus-x.com" >> $GITHUB_OUTPUT | |
| echo "VERSION_LABEL=v2.x (Beta)" >> $GITHUB_OUTPUT | |
| else | |
| echo "LINE=v1" >> $GITHUB_OUTPUT | |
| echo "PUBLIC_ORIGIN=https://v1.element-plus-x.com" >> $GITHUB_OUTPUT | |
| echo "VERSION_LABEL=v1.x" >> $GITHUB_OUTPUT | |
| fi | |
| - name: Build docs | |
| env: | |
| DOCS_LINE: ${{ steps.docs_env.outputs.LINE }} | |
| DOCS_PUBLIC_ORIGIN: ${{ steps.docs_env.outputs.PUBLIC_ORIGIN }} | |
| DOCS_VERSION_LABEL: ${{ steps.docs_env.outputs.VERSION_LABEL }} | |
| DOCS_V1_ORIGIN: https://v1.element-plus-x.com | |
| DOCS_V2_ORIGIN: https://v2.element-plus-x.com | |
| DOCS_ROOT_ORIGIN: https://element-plus-x.com | |
| DOCS_USE_SOURCE: 'true' | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| mkdir -p apps/internal/metadata/dist | |
| if [[ ! -f apps/internal/metadata/dist/component-contributors.json ]]; then | |
| echo '{}' > apps/internal/metadata/dist/component-contributors.json | |
| fi | |
| pnpm run gen:changelog | |
| pnpm -C apps/docs build |