diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml new file mode 100644 index 0000000..24fb881 --- /dev/null +++ b/.forgejo/workflows/deploy.yml @@ -0,0 +1,46 @@ +name: Deploy + +on: + push: + branches: + - main + +jobs: + deploy: + name: Deploy to Production + runs-on: docker + container: + image: forgejo-ci-php:latest + steps: + - name: Checkout code + run: | + git clone --depth 1 --branch main https://oauth2:${{ github.token }}@forge.studio-variable.com/${{ github.repository }}.git . + + - name: Install Node.js and build assets + run: | + curl -fsSL https://deb.nodesource.com/setup_lts.x | bash - + apt-get install -y -qq nodejs + npm install + npx gulp + + - name: Install PHP dependencies + run: | + composer install --no-dev --optimize-autoloader + + - name: Deploy via FTP + env: + USERNAME: ${{ secrets.USERNAME }} + PASSWORD: ${{ secrets.PASSWORD }} + HOST: ${{ secrets.HOST }} + run: | + apt-get install -y -qq lftp + cat > /tmp/lftp-script.txt <