Skip to content

Commit

Permalink
Update deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
pkufool authored Jan 20, 2025
1 parent 177b30f commit 4088caa
Showing 1 changed file with 8 additions and 19 deletions.
27 changes: 8 additions & 19 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ on:
push:
branches:
- master
schedule:
# minute (0-59)
# hour (0-23)
# day of the month (1-31)
# month (1-12)
# day of the week (0-6)
# nightly build at 23:50 UTC time every day
- cron: "50 23 * * *"

jobs:

Expand Down Expand Up @@ -65,22 +73,3 @@ jobs:
echo "${{ secrets.K2_KEY }}" > id_rsa && chmod 600 id_rsa
scp -P $port -r -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i id_rsa site/* $user@$server:~/www
rm id_rsa
- name: Build pages for kingway.fun/k2
if: github.repository_owner == 'pkufool'
shell: bash
run: |
sed -i 's/link: \//link: \/k2\//g' mkdocs.yml
sed -i 's/link: \//link: \/k2\//g' mkdocs-zh-CN.yml
mkdocs build -f mkdocs.yml
mkdocs build -f mkdocs-zh-CN.yml
- name: Deploy pages to kingway.fun/k2
if: github.repository_owner == 'pkufool'
run: |
user=${{ secrets.USERNAME }}
server=${{ secrets.HOST }}
port=${{ secrets.PORT }}
echo "${{ secrets.KEY }}" > id_rsa && chmod 600 id_rsa
scp -P $port -r -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null -i id_rsa site/* $user@$server:~/deploy/k2
rm id_rsa

0 comments on commit 4088caa

Please sign in to comment.