Skip to content

Commit

Permalink
簡單點
Browse files Browse the repository at this point in the history
  • Loading branch information
Wcc723 committed Sep 15, 2023
1 parent d64ca44 commit 8523249
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/pm2-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,12 @@ jobs:
with:
node-version: 18

- name: Install SSH key # 第二步,安裝 SSH 密鑰
uses: shimataro/ssh-key-action@v2 # 使用第三方的 ssh-agent 動作
with:
key: ${{ secrets.DEPLOY_SSH_KEY }} # 從 GitHub Secrets 中取得私鑰
passphrase: 1234
- name: Start SSH agent
run: |
eval $(ssh-agent -s)
echo "${{ secrets.DEPLOY_SSH_KEY }}" | base64 --decode > /tmp/deploy_key
chmod 600 /tmp/deploy_key
echo "1234" | ssh-add /tmp/deploy_key
- name: Install node_modules
run: |
Expand Down

0 comments on commit 8523249

Please sign in to comment.