docs: improve deployment docs and release assets

- rewrite README for GitHub presentation and add env copy steps for local development
- expand DEPLOYMENT guide with API-only and full compose deployment paths
- add apps/api/.env.example for development bootstrap
- add docker-compose.full.yml and nginx config for full self-hosted deployment
- update release workflow to publish a deployment bundle alongside web dist assets
This commit is contained in:
SmileQWQ
2026-04-17 08:40:01 +08:00
parent cc1c90c167
commit 006d14adbb
5 changed files with 271 additions and 72 deletions

View File

@@ -49,6 +49,19 @@ jobs:
cd apps/web/dist
zip -r ../../../subtracker-web-dist.zip .
- name: Archive deployment bundle
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
run: |
mkdir -p release-assets/subtracker-deploy/docker
cp docker-compose.yml release-assets/subtracker-deploy/
cp docker-compose.full.yml release-assets/subtracker-deploy/
cp DEPLOYMENT.md release-assets/subtracker-deploy/
cp README.md release-assets/subtracker-deploy/
cp apps/api/.env.example release-assets/subtracker-deploy/api.env.example
cp docker/nginx.full.conf release-assets/subtracker-deploy/docker/nginx.full.conf
cd release-assets
zip -r ../subtracker-deploy-bundle.zip subtracker-deploy
- name: Upload web artifact
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
@@ -56,6 +69,13 @@ jobs:
name: subtracker-web-dist
path: subtracker-web-dist.zip
- name: Upload deployment artifact
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
uses: actions/upload-artifact@v4
with:
name: subtracker-deploy-bundle
path: subtracker-deploy-bundle.zip
release:
if: startsWith(github.ref, 'refs/tags/v') || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
@@ -91,6 +111,18 @@ jobs:
cd apps/web/dist
zip -r ../../../subtracker-web-dist.zip .
- name: Archive deployment bundle
run: |
mkdir -p release-assets/subtracker-deploy/docker
cp docker-compose.yml release-assets/subtracker-deploy/
cp docker-compose.full.yml release-assets/subtracker-deploy/
cp DEPLOYMENT.md release-assets/subtracker-deploy/
cp README.md release-assets/subtracker-deploy/
cp apps/api/.env.example release-assets/subtracker-deploy/api.env.example
cp docker/nginx.full.conf release-assets/subtracker-deploy/docker/nginx.full.conf
cd release-assets
zip -r ../subtracker-deploy-bundle.zip subtracker-deploy
- name: Resolve release tag
id: release_tag
shell: bash
@@ -136,5 +168,7 @@ jobs:
with:
tag_name: ${{ steps.release_tag.outputs.value }}
name: ${{ steps.release_tag.outputs.value }}
files: subtracker-web-dist.zip
files: |
subtracker-web-dist.zip
subtracker-deploy-bundle.zip
generate_release_notes: true