diff --git a/.forgejo/workflows/deploy-preprod.yml b/.forgejo/workflows/deploy-preprod.yml new file mode 100644 index 0000000..493715f --- /dev/null +++ b/.forgejo/workflows/deploy-preprod.yml @@ -0,0 +1,40 @@ +name: Deploy Preproduction + +on: + push: + branches: + - preprod + +jobs: + deploy: + name: Deploy to Preproduction + runs-on: docker + container: + image: forgejo-ci-node:latest + steps: + - name: Checkout code + run: | + git clone --depth 1 --branch preprod https://forge.studio-variable.com/${{ github.repository }}.git . + + - name: Build Svelte app + run: | + npm ci + npm run build + + - name: Deploy via FTP + env: + USERNAME: ${{ secrets.USERNAME }} + PASSWORD: ${{ secrets.PASSWORD }} + HOST: ${{ secrets.PREPRODUCTION_HOST }} + run: | + apt-get update -qq && apt-get install -y -qq lftp + cat > /tmp/lftp-script.txt <