From d070a4188b6b8ce40d3bf64452317be3f102b572 Mon Sep 17 00:00:00 2001 From: rustdesk Date: Mon, 10 Jul 2023 14:55:26 +0800 Subject: [PATCH] deploy acition --- .github/workflows/deploy.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 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 0000000..495d13c --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,24 @@ +name: Deploy + +on: [workflow_dispatch] + +jobs: + name: Deploy + runs-on: ubuntu-latest + steps: + + - name: Checkout + uses: actions/checkout@v3 + + - name: Install Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: 'latest' + + - name: Build + run: | + hugo --minify + cd public; tar czf x * + echo -e "${{ secrets.SK }}" > sk.txt + scp x ${{ secrets.HOST }}:/tmp/ -i sk.txt + ssh ${{ secrets.HOST }} -i sk.txt "sudo rm -rf /var/www/html/rustdesk.com/docs/* && sudo tar xzf /tmp/x -C /var/www/html/rustdesk.com/docs/ && /bin/rm /tmp/x && sudo chown www-data:www-data /var/www/html/rustdesk.com/docs/ -R"