From 3ecd0403875c2e66ce8e300aabc95d5e2bd93d3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20MARQUET?= <72651575+BreizhHardware@users.noreply.github.com> Date: Mon, 28 Oct 2024 11:54:08 +0000 Subject: [PATCH] Add CI for deployment on the server (will fail until the production server is online) --- .github/workflows/deploy.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..1d6918e --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,28 @@ +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 +