Skip to content

Commit

Permalink
feat: ci 更改
Browse files Browse the repository at this point in the history
  • Loading branch information
Tangjj1996 committed Aug 27, 2024
1 parent 05bca83 commit b73e97e
Showing 1 changed file with 7 additions and 13 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: checkout code
uses: actions/checkout@v3

- name: Install SSH client
run: sudo apt-get update && sudo apt-get install -y openssh-client

- name: Set up SSH keys
uses: shimataro/ssh-key-action@v2
- name: executing remote ssh commands using password
uses: appleboy/[email protected]
with:
key: ${{ secrets.SSH_PRIVATE_KEY }}
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}

- name: Connect to ECS
run: ssh -o StrictHostKeyChecking=no -i $HOME/.ssh/id_rsa [email protected] "cd /var/www/blog && npm i && npm run build"
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
port: ${{ secrets.PORT }}
script: whoami

0 comments on commit b73e97e

Please sign in to comment.