Skip to content

Commit dcbfa10

Browse files
committed
[deploy] ssh key 수정
1 parent 9afdd9f commit dcbfa10

1 file changed

Lines changed: 4 additions & 9 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,18 @@ jobs:
3838
deploy:
3939
runs-on: ubuntu-latest
4040
needs: test
41+
# run on push to main or main-test, or when manually triggered
4142
if: (github.event_name == 'push' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/main-test')) || github.event_name == 'workflow_dispatch'
4243
steps:
4344
- uses: actions/checkout@v4
4445

45-
- name: Write SSH key (decode base64 secret) into workspace
46-
run: |
47-
set -e
48-
printf '%s' "${{ secrets.KEY }}" | base64 --decode --ignore-garbage > "${GITHUB_WORKSPACE}/gha_key"
49-
chmod 600 "${GITHUB_WORKSPACE}/gha_key"
50-
head -n1 "${GITHUB_WORKSPACE}/gha_key" # should print BEGIN line
51-
5246
- name: Deploy to server
5347
uses: appleboy/ssh-action@v1.0.3
5448
with:
5549
host: ${{ secrets.HOST }}
56-
username: ubuntu
57-
key_path: ${{ github.workspace }}/gha_key # 🔑 use workspace path
50+
username: ${{ secrets.USERNAME }}
51+
key: ${{ secrets.KEY }} # raw multi-line private key (BEGIN/END + newlines)
52+
# passphrase: ${{ secrets.KEY_PASSPHRASE }} # only if your key has one
5853
script: |
5954
set -e
6055
cd /home/ubuntu/Moodico

0 commit comments

Comments
 (0)