Merge pull request #8 from appen-isen/felix

Felix
This commit is contained in:
Félix MARQUET
2024-10-29 13:11:58 +01:00
committed by GitHub
3 changed files with 26 additions and 28 deletions

View File

@@ -0,0 +1,9 @@
{
"runArgs": ["--device=/dev/net/tun"],
"image": "mcr.microsoft.com/devcontainers/universal:2",
"features": {
"ghcr.io/tailscale/codespace/tailscale": {
"version": "latest"
}
}
}

View File

@@ -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

17
Jenkinsfile vendored Normal file
View File

@@ -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
'''
}
}
}
}
}