From 7fd07928b340e3a9795bc4c10d41820d5daffb61 Mon Sep 17 00:00:00 2001 From: Hufe921 Date: Sat, 31 Dec 2022 22:38:54 +0800 Subject: [PATCH] feat:add docs workflow --- .github/workflows/docs.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..538a941 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,31 @@ +name: docs + +on: + push: + branches: [main] + paths: + - 'docs/**' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm i yarn -g + - run: yarn + - run: yarn run docs:build + - run: mv ./docs/.vitepress/dist canvas-editor-docs + - name: Copy folder content recursively to remote + uses: garygrossgarten/github-action-scp@release + with: + local: ./docs/.vitepress/canvas-editor-docs + remote: ${{ secrets.DOCS_PATH }} + host: ${{ secrets.HOST }} + username: ${{ secrets.USERNAME }} + password: ${{ secrets.PASSWORD }} + rmRemote: true