diff --git a/.woodpecker.yaml b/.woodpecker.yaml index 2193abe..ad06159 100644 --- a/.woodpecker.yaml +++ b/.woodpecker.yaml @@ -1,19 +1,13 @@ steps: deploy: - image: kroniak/ssh-client - environment: - - USER=linuxserver.io - - HOST=hadeedahmad.xyz - - PORT=33262 + image: alpine:latest + name: Zip files commands: - - mkdir -p ~/.ssh - - chmod 700 ~/.ssh - - echo -e "Host *\n\tStrictHostKeyChecking no\n\n" > ~/.ssh/config - - echo "$SSH_STAGING_KEY" > ~/.ssh/staging.key - - chmod 600 ~/.ssh/staging.key - - ssh -i ~/.ssh/staging.key -p $${PORT} $${USER}@$${HOST} "rm -rf /srv/hadeedahmad-xyz" - - scp -ri ~/.ssh/staging.key -P $${PORT} * $${USER}@$${HOST}:/srv/hadeedahmad-xyz - secrets: [ SSH_STAGING_KEY ] + - apk add --no-cache zip curl + - zip -r project.zip . -x ".*" + - curl -s -w "{%http_code}" -X POST -F "zipfile=@project.zip" -H "Authorization: Bearer $API_KEY" https://pages.hadeedahmad.com/pages/me | grep -q "200" + secrets: [ API_KEY ] when: - event: push branch: main + - event: manual