mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2025-07-15 16:53:03 +00:00
29 lines
881 B
YAML
29 lines
881 B
YAML
name: Deploy
|
|
|
|
on: [workflow_dispatch]
|
|
|
|
jobs:
|
|
deploy:
|
|
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: |
|
|
sudo apt update -y
|
|
sudo apt install -y git
|
|
git clone https://github.com/matcornic/hugo-theme-learn themes/hugo-theme-learn --depth=1
|
|
hugo --minify
|
|
cd public; tar czf x *
|
|
echo -e "${{ secrets.SK }}" > sk.txt
|
|
scp -i sk.txt x ${{ secrets.HOST }}:/tmp/
|
|
ssh -i sk.txt ${{ secrets.HOST }} "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"
|