mirror of
https://github.com/element-plus/element-plus.git
synced 2024-12-21 02:50:11 +08:00
4e99d0b5ba
* build!: simplify build & support native esm import * build: refactor build * refactor: reorganize files * refactor: refactor build * build: improve perf * fix: scripts * build: add rollup-plugin-filesize * chore: scripts ignore no-console * build: disable tree-shaking * build: improve code * build: add sourcemap * build: add banner * refactor: remove annotation * build!: improve esm exports (#3871) * build: improve esm import * refactor: change mjs for esm version * chore: improve exports map * fix: add sideEffects * refactor: improve alias * build: upgrade dependencies
65 lines
1.6 KiB
YAML
65 lines
1.6 KiB
YAML
name: Deploy Docs Website
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows: ['Publish to NPM registry']
|
|
types: [completed]
|
|
|
|
jobs:
|
|
deploy-docs:
|
|
runs-on: ubuntu-latest
|
|
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
ref: ${{ github.event.workflow_run.head_sha }}
|
|
persist-credentials: false
|
|
|
|
- name: Setup node
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '16'
|
|
|
|
- name: Setup pnpm
|
|
uses: pnpm/action-setup@v2
|
|
with:
|
|
version: latest
|
|
|
|
- name: Install dependencies
|
|
run: pnpm i --frozen-lockfile
|
|
|
|
- name: Init Crowdin token
|
|
run: pnpm run docs:crowdin-credentials
|
|
env:
|
|
CROWDIN_TOKEN: ${{secrets.CROWDIN_TOKEN}}
|
|
|
|
- name: Pull Crowdin translations
|
|
run: cd docs && pnpm exec crowdin download
|
|
|
|
- name: Generate common locale
|
|
run: pnpm docs:gen-locale
|
|
|
|
- name: Install latest Element Plus
|
|
run: cd docs && pnpm i element-plus@latest
|
|
|
|
- name: Build website
|
|
run: pnpm docs:build
|
|
env:
|
|
DOC_ENV: production
|
|
|
|
- name: Deploy
|
|
uses: JamesIves/github-pages-deploy-action@3.7.1
|
|
with:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
BRANCH: gh-pages
|
|
FOLDER: docs/.vitepress/dist
|
|
GIT_CONFIG_NAME: ElementPlusBot
|
|
GIT_CONFIG_EMAIL: hello@element-plus.org
|
|
COMMIT_MESSAGE: website deploy
|
|
|
|
- name: Sync
|
|
env:
|
|
TRIGGERSYNCURL: ${{ secrets.TRIGGERSYNCURL }}
|
|
run: curl "$TRIGGERSYNCURL"
|