mirror of
https://github.com/rustdesk/doc.rustdesk.com.git
synced 2025-04-16 23:38:48 +02:00
fix ci
This commit is contained in:
parent
feb202a285
commit
e1c04f12b0
15
.github/workflows/deploy.yml
vendored
15
.github/workflows/deploy.yml
vendored
@ -16,6 +16,16 @@ jobs:
|
||||
with:
|
||||
hugo-version: 'latest'
|
||||
|
||||
- name: Add SSH key to agent
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
chmod 700 ~/.ssh
|
||||
echo "${{ secrets.SK }}" > ~/.ssh/id_rsa
|
||||
chmod 600 ~/.ssh/id_rsa
|
||||
ssh-keyscan ${{ secrets.HOST }} >> ~/.ssh/known_hosts
|
||||
eval "$(ssh-agent -s)"
|
||||
ssh-add ~/.ssh/id_rsa
|
||||
|
||||
- name: Build
|
||||
run: |
|
||||
sudo apt update -y
|
||||
@ -23,6 +33,5 @@ jobs:
|
||||
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"
|
||||
scp x ${{ secrets.NAME }}@${{ secrets.HOST }}:/tmp/
|
||||
ssh ${{ secrets.NAME }}@${{ 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"
|
||||
|
Loading…
Reference in New Issue
Block a user