Deploy to Production (witstore.wende.it) / deploy (push) Successful in 7s
- release.yml: triggered by git tag v*, builds assets, creates ZIP, attaches to Gitea release - install.sh: interactive first-time setup (DB config, key:generate, migrate, seed, cache) - update.sh: update existing installation (clear caches, migrate, rebuild) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
70 lines
1.9 KiB
YAML
70 lines
1.9 KiB
YAML
name: Release erstellen
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
build-release:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Code auschecken
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Node.js einrichten
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '20'
|
|
|
|
- name: PHP einrichten
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.4'
|
|
|
|
- name: Composer Dependencies installieren
|
|
run: composer install --no-dev --optimize-autoloader --no-interaction
|
|
|
|
- name: NPM Dependencies installieren & Assets bauen
|
|
run: |
|
|
npm ci
|
|
npm run build
|
|
|
|
- name: Release-Paket erstellen
|
|
run: |
|
|
VERSION="${{ github.ref_name }}"
|
|
PACKAGE="witshop-${VERSION}.zip"
|
|
|
|
zip -r "$PACKAGE" . \
|
|
--exclude "*.git*" \
|
|
--exclude "node_modules/*" \
|
|
--exclude "tests/*" \
|
|
--exclude ".env*" \
|
|
--exclude "*.zip" \
|
|
--exclude "storage/logs/*" \
|
|
--exclude "storage/framework/cache/*" \
|
|
--exclude "storage/framework/sessions/*" \
|
|
--exclude "storage/framework/views/*"
|
|
|
|
echo "PACKAGE=$PACKAGE" >> $GITHUB_ENV
|
|
echo "VERSION=$VERSION" >> $GITHUB_ENV
|
|
|
|
- name: Release in Gitea veröffentlichen
|
|
uses: https://gitea.com/actions/release-action@main
|
|
with:
|
|
files: ${{ env.PACKAGE }}
|
|
api_key: ${{ secrets.RELEASE_TOKEN }}
|
|
title: "WITshop ${{ env.VERSION }}"
|
|
body: |
|
|
## WITshop ${{ env.VERSION }}
|
|
|
|
### Installation (Erstinstallation)
|
|
1. ZIP herunterladen und auf den Server entpacken
|
|
2. `install.sh` ausführen: `bash install.sh`
|
|
3. Fertig
|
|
|
|
### Update (bestehende Installation)
|
|
1. ZIP herunterladen und auf den Server entpacken
|
|
2. `update.sh` ausführen: `bash update.sh`
|