Add Deployment Setup: manual Gitea Actions build/test/artifact pipeline
Co-authored-by: Junie <junie@jetbrains.com>
This commit is contained in:
@@ -0,0 +1,68 @@
|
||||
name: Build, Test and Package Release
|
||||
|
||||
# Manually triggered pipeline (see aidlc-docs/features/react-frontend/operations/deployment/deployment-instructions.md):
|
||||
# - Run it yourself from Gitea Actions, picking the branch/ref to run against.
|
||||
# - Always runs the build/test/lint gate first.
|
||||
# - The "deploy" step currently only packages dist/ as a downloadable artifact
|
||||
# (no automatic upload to a host yet). Typically run on a `release/*` branch
|
||||
# once you've manually created it for a release.
|
||||
|
||||
on:
|
||||
workflow_dispatch: {}
|
||||
|
||||
jobs:
|
||||
build-and-test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4
|
||||
with:
|
||||
version: 9
|
||||
|
||||
- name: Install dependencies
|
||||
run: pnpm install --frozen-lockfile
|
||||
|
||||
- name: Lint
|
||||
run: pnpm run lint
|
||||
|
||||
- name: Unit tests
|
||||
run: pnpm run test
|
||||
|
||||
- name: Build
|
||||
run: pnpm run build
|
||||
|
||||
- name: Upload build artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
path: dist/
|
||||
retention-days: 30
|
||||
|
||||
deploy:
|
||||
needs: build-and-test
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Download build artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: dist
|
||||
path: dist
|
||||
|
||||
# Placeholder deploy step: for now this only re-publishes dist/ as a clearly
|
||||
# named, ready-to-download artifact. Once the hosting/upload method (FTP/SFTP/
|
||||
# other) is finalized, replace this step with the actual upload and this
|
||||
# comment can be removed.
|
||||
- name: Package release artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: release-dist
|
||||
path: dist/
|
||||
retention-days: 30
|
||||
Reference in New Issue
Block a user