diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..ef28c4f --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,9 @@ +{ + "runArgs": ["--device=/dev/net/tun"], + "image": "mcr.microsoft.com/devcontainers/universal:2", + "features": { + "ghcr.io/tailscale/codespace/tailscale": { + "version": "latest" + } + } +} diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 1d6918e..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Deploy to server - -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Copy build directory to server - uses: Dylan700/sftp-upload-action@v1.2.3 - with: - server: ${{ secrets.SERVER_HOST }} - username: ${{ secrets.SERVER_USERNAME }} - password: ${{ secrets.SERVER_PASSWORD }} - port: ${{ secrets.SERVER_PORT }} - uploads: | - ./Front => /var/www/site-interpromo-2024 - delete: true - diff --git a/Jenkinsfile b/Jenkinsfile new file mode 100644 index 0000000..dffe789 --- /dev/null +++ b/Jenkinsfile @@ -0,0 +1,17 @@ +pipeline { + agent any + environment { + SSH_CREDENTIALS_ID = 'ssh-appen' + } + stages { + stage('SCP folder to remote server') { + steps { + withCredentials([sshUserPrivateKey(credentialsId: env.SSH_CREDENTIALS_ID, keyFileVariable: 'SSH_KEY', usernameVariable: 'SSH_USER')]) { + sh ''' + scp -r -o StrictHostKeyChecking=no -i $SSH_KEY Front $SSH_USER@192.168.21.177:/var/www/site-interpromo-2024 + ''' + } + } + } + } +} \ No newline at end of file