From 8e32034aa5c3306ffe3fa3de6ea2fd79757da862 Mon Sep 17 00:00:00 2001 From: Aex Date: Fri, 17 Sep 2021 11:03:19 +0800 Subject: [PATCH] chore(project): move staging preview to gh-pages (#3446) * chore(project): move staging preview to gh-pages * chore(project): update config * chore(project): delete staging branch * chore(project): delete useless file * chore(project): delete commit message * chore: update target branch * chore: update typo * chore: update bot token * chore(project): ready for merge --- .github/workflows/staging-preview.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/staging-preview.yml b/.github/workflows/staging-preview.yml index c2a57449a1..bd3e335ea1 100644 --- a/.github/workflows/staging-preview.yml +++ b/.github/workflows/staging-preview.yml @@ -38,7 +38,7 @@ jobs: - name: Pull Crowdin translations run: cd docs && yarn crowdin download - - name: generate common locale + - name: Generate common locale run: yarn docs:gen-locale - name: Build website @@ -46,10 +46,12 @@ jobs: env: DOC_ENV: staging - - name: Deploy Site - run: | - export DEPLOY_DOMAIN=https://staging-preview-element-plus.surge.sh - echo "Deploy to $DEPLOY_DOMAIN" - npx surge --project ./docs/.vitepress/dist/ --domain $DEPLOY_DOMAIN --token $SURGE_TOKEN - env: - SURGE_TOKEN: ${{ secrets.SURGE_TOKEN }} + - name: Deploy staging website + uses: JamesIves/github-pages-deploy-action@4.1.5 + with: + token: ${{ secrets.EP_BOT_TOKEN }} + branch: main + folder: docs/.vitepress/dist + repository-name: element-plus/staging + git-config-name: ElementPlusBot + git-config-email: hello@element-plus.org