mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-19 22:24:17 +01:00
optimize CI times
This commit is contained in:
6
.github/workflows/build.yml
vendored
6
.github/workflows/build.yml
vendored
@@ -37,8 +37,8 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
cache: "poetry"
|
cache: "poetry"
|
||||||
- run: "poetry install"
|
- run: "SKIP_BUILD_FRONTEND=true poetry install"
|
||||||
- run: "poetry build"
|
- run: "SKIP_BUILD_FRONTEND=true poetry build"
|
||||||
|
|
||||||
build-logo:
|
build-logo:
|
||||||
name: "Build logo"
|
name: "Build logo"
|
||||||
@@ -53,7 +53,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
python-version: "3.11"
|
python-version: "3.11"
|
||||||
cache: "poetry"
|
cache: "poetry"
|
||||||
- run: "poetry install"
|
- run: "SKIP_BUILD_FRONTEND=true poetry install"
|
||||||
- run: "poetry run python yacv_server/logo.py"
|
- run: "poetry run python yacv_server/logo.py"
|
||||||
- run: "cp assets/fox.glb assets/logo_build/fox.glb"
|
- run: "cp assets/fox.glb assets/logo_build/fox.glb"
|
||||||
- uses: "actions/upload-artifact@v4"
|
- uses: "actions/upload-artifact@v4"
|
||||||
|
|||||||
3
.github/workflows/deploy.yml
vendored
3
.github/workflows/deploy.yml
vendored
@@ -17,7 +17,7 @@ concurrency:
|
|||||||
cancel-in-progress: false
|
cancel-in-progress: false
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy-frontend:
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
environment:
|
environment:
|
||||||
name: "github-pages"
|
name: "github-pages"
|
||||||
@@ -50,3 +50,4 @@ jobs:
|
|||||||
- id: "deployment"
|
- id: "deployment"
|
||||||
uses: "actions/deploy-pages@v4"
|
uses: "actions/deploy-pages@v4"
|
||||||
|
|
||||||
|
# TODO: deploy-backend
|
||||||
|
|||||||
7
build.py
7
build.py
@@ -2,6 +2,7 @@ import os
|
|||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
# When building the backend, make sure the frontend is built first
|
if os.getenv('SKIP_BUILD_FRONTEND') is None:
|
||||||
subprocess.run(['yarn', 'install'], check=True)
|
# When building the backend, make sure the frontend is built first
|
||||||
subprocess.run(['yarn', 'build', '--outDir', 'yacv_server/frontend'], check=True)
|
subprocess.run(['yarn', 'install'], check=True)
|
||||||
|
subprocess.run(['yarn', 'build', '--outDir', 'yacv_server/frontend'], check=True)
|
||||||
|
|||||||
Reference in New Issue
Block a user