diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml deleted file mode 100644 index 5191548..0000000 --- a/.forgejo/workflows/deploy.yml +++ /dev/null @@ -1,22 +0,0 @@ -on: [push] -jobs: - deploy: - runs-on: docker - container: - image: alpine:latest - steps: - - name: Install SSH - run: apk --no-cache add openssh-client - shell: sh - - - name: Configure SSH - run: | - mkdir -p ~/.ssh/ - chmod 700 ~/.ssh/ - echo "${{ secrets.SSH_KEY }}" > ~/.ssh/staging.key - chmod 600 ~/.ssh/staging.key - shell: sh - - - name: Deploy - run: ssh -i ~/.ssh/staging.key -o StrictHostKeyChecking=no hadeed@hadeedahmad.xyz 'cd nginx/www; git fetch; git reset --hard origin/main' - shell: sh diff --git a/.woodpecker.yaml b/.woodpecker.yaml new file mode 100644 index 0000000..7028fba --- /dev/null +++ b/.woodpecker.yaml @@ -0,0 +1,16 @@ +steps: + deploy: + image: kroniak/ssh-client + environment: + - USER=linuxserver.io + - HOST=hadeedahmad.xyz + - PORT=33262 + 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 ]