From f571a82192dcb187c0e077f8fbfd89859ca99e45 Mon Sep 17 00:00:00 2001 From: fengjiansu Date: Wed, 29 May 2024 21:38:26 +0800 Subject: [PATCH] sshkey --- .github/workflows/deploy.yml | 11 ++++++----- .gitignore | 4 +++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 57cce53..191d026 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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' @@ -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 diff --git a/.gitignore b/.gitignore index 9523aef..063b0e4 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,6 @@ Thumbs.db db.json *.log -node_modules/ \ No newline at end of file +node_modules/ +public/ +.deploy*/ \ No newline at end of file