Skip to content

Commit

Permalink
sshkey
Browse files Browse the repository at this point in the history
  • Loading branch information
fengjiansu committed May 29, 2024
1 parent 42fb5b8 commit f571a82
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ jobs:

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '14'

Expand All @@ -36,10 +36,11 @@ jobs:
- name: Deploy Hexo
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
run: |
HEXO_DEPLOY_PRI: ${{secrets.HEXO_DEPLOY_PRI}}
run:
sudo timedatectl set-timezone "Asia/Shanghai"
mkdir -p ~/.ssh
echo "${SSH_PRIVATE_KEY}" > ~/.ssh/id_rsa
echo "$HEXO_DEPLOY_PRI" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
npx hexo clean
Expand Down
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@
Thumbs.db
db.json
*.log
node_modules/
node_modules/
public/
.deploy*/

0 comments on commit f571a82

Please sign in to comment.