From 0561835821b112fa43a964d96d257c0bbcd6cf41 Mon Sep 17 00:00:00 2001 From: ruki Date: Sat, 31 Oct 2020 09:37:21 +0800 Subject: [PATCH] add deploy ci --- .github/workflows/deploy.yml | 41 ++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 000000000..1420e7df6 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,41 @@ +name: Deploy + +on: + push: + branches: + - master + +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest] + + runs-on: ${{ matrix.os }} + + steps: + - name: Install Xmake + - uses: xmake-io/github-action-setup-xmake@v1 + with: + xmake-version: branch@dev + + - name: Install SSH key + uses: shimataro/ssh-key-action@v2 + with: + key: ${{ secrets.SSH_KEY }} + name: id_rsa # optional + known_hosts: ${{ secrets.KNOWN_HOSTS }} + + - name: Publish + run: | + git clone git@github.com:xmake-io/xrepo-docs.git + cd xrepo-docs + git remote add all git@github.com:xmake-io/xrepo-docs.git + git remote set-url --add all git@github.com:waruqi/xrepo-docs.git + git remote set-url --add all git@gitee.com:xmake-io/xrepo-docs.git + git remote set-url --add all git@gitlab.com:xmake-io/xrepo-docs.git + xmake l build.lua + git commit -a -m "update docs" + git push all master + +