From f6ec02ce87a77fffda515cc40010b74f39678b70 Mon Sep 17 00:00:00 2001 From: tangying1027 <33517362+tangying1027@users.noreply.github.com> Date: Tue, 21 Feb 2023 19:42:23 +0800 Subject: [PATCH] feat: add sync site action (#1734) Co-authored-by: xuying.xu --- .github/workflows/develop.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/develop.yml diff --git a/.github/workflows/develop.yml b/.github/workflows/develop.yml new file mode 100644 index 000000000..0e7c4f84d --- /dev/null +++ b/.github/workflows/develop.yml @@ -0,0 +1,28 @@ +name: 🤖 Sync to gh-pages + +on: + push: + branches: + - v5.0.x + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - run: yarn install + - run: cd site && yarn install + - run: cd site && npm run site:build + - run: | + cd site/dist + git init + git config --local user.name antv + git config --local user.email antv@antfin.com + git add . + git commit -m "update site" + - uses: ad-m/github-push-action@master + with: + github_token: ${{secrets.GITHUB_TOKEN}} + directory: site/dist + branch: gh-pages + force: true