diff --git a/.github/workflows/roa.yml b/.github/workflows/roa.yml index 80714fb..fe64f12 100644 --- a/.github/workflows/roa.yml +++ b/.github/workflows/roa.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/checkout@v2 with: - fetch-depth: 0 + ssh-key: ${{ secrets.DEPLOY_KEY }} repository: NeoCloud/NeoNetwork-ROA path: generated @@ -31,5 +31,3 @@ jobs: - run: .scripts/generate-roa.sh - run: .scripts/push-to-roa.sh - env: - SSHPRIVKEY: ${{ secrets.KEY }} diff --git a/.scripts/push-to-roa.sh b/.scripts/push-to-roa.sh index 06f000b..7c4007f 100755 --- a/.scripts/push-to-roa.sh +++ b/.scripts/push-to-roa.sh @@ -2,20 +2,10 @@ set -euo pipefail IFS=$'\n\t' -if [ -z "$SSHPRIVKEY" ]; then - echo SSHPRIVKEY is not set - exit 1 -fi - -mkdir -p "$HOME/.ssh" -echo "$SSHPRIVKEY" | base64 -d >"$HOME/.ssh/id_ed25519" -chmod 0600 "$HOME/.ssh/id_ed25519" - set -x cd generated || exit 1 -git remote set-url origin git@github.com:NeoCloud/NeoNetwork-ROA.git git config user.name "NeoCloud ROA bot" git config user.email "support@neocloud.tw" git add .