This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
name: CI
|
||||
|
||||
concurrency:
|
||||
group: rednote-tool-studio-production
|
||||
cancel-in-progress: false
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
@@ -21,3 +25,16 @@ jobs:
|
||||
run: npm test
|
||||
- name: Production build
|
||||
run: npm run build
|
||||
- name: Deploy production container
|
||||
if: gitea.event_name == 'push' && gitea.ref == 'refs/heads/main'
|
||||
env:
|
||||
STUDIO_USERNAME: studio
|
||||
STUDIO_PASSWORD: ${{ secrets.STUDIO_PASSWORD }}
|
||||
DEPLOY_PORT: ${{ vars.DEPLOY_PORT }}
|
||||
GITHUB_SHA: ${{ gitea.sha }}
|
||||
run: |
|
||||
if [ -z "$STUDIO_PASSWORD" ]; then
|
||||
echo "Deployment skipped: repository secret STUDIO_PASSWORD is not configured"
|
||||
exit 0
|
||||
fi
|
||||
node scripts/deploy.mjs
|
||||
|
||||
Reference in New Issue
Block a user