mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-19 22:24:17 +01:00
improve workflows, and add a deploy workflow
This commit is contained in:
14
.github/workflows/ci.yml
vendored
14
.github/workflows/ci.yml
vendored
@@ -16,9 +16,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@v4"
|
- uses: "actions/checkout@v4"
|
||||||
- uses: "actions/setup-node@v4"
|
- uses: "actions/setup-node@v4"
|
||||||
|
with:
|
||||||
|
cache: "yarn"
|
||||||
- run: "yarn install"
|
- run: "yarn install"
|
||||||
- run: "yarn build"
|
- run: "yarn build"
|
||||||
- uses: "actions/upload-artifact@v3"
|
- uses: "actions/upload-artifact@v4"
|
||||||
with:
|
with:
|
||||||
name: "frontend"
|
name: "frontend"
|
||||||
path: "./dist"
|
path: "./dist"
|
||||||
@@ -29,9 +31,13 @@ jobs:
|
|||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@v4"
|
- uses: "actions/checkout@v4"
|
||||||
|
- uses: "actions/setup-node@v4"
|
||||||
|
with:
|
||||||
|
cache: "yarn"
|
||||||
- run: "pipx install poetry"
|
- run: "pipx install poetry"
|
||||||
- uses: "actions/setup-python@v5"
|
- uses: "actions/setup-python@v5"
|
||||||
with:
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
cache: "poetry"
|
cache: "poetry"
|
||||||
- run: "poetry install"
|
- run: "poetry install"
|
||||||
- run: "poetry build"
|
- run: "poetry build"
|
||||||
@@ -41,14 +47,18 @@ jobs:
|
|||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
steps:
|
steps:
|
||||||
- uses: "actions/checkout@v4"
|
- uses: "actions/checkout@v4"
|
||||||
|
- uses: "actions/setup-node@v4"
|
||||||
|
with:
|
||||||
|
cache: "yarn"
|
||||||
- run: "pipx install poetry"
|
- run: "pipx install poetry"
|
||||||
- uses: "actions/setup-python@v5"
|
- uses: "actions/setup-python@v5"
|
||||||
with:
|
with:
|
||||||
|
python-version: "3.11"
|
||||||
cache: "poetry"
|
cache: "poetry"
|
||||||
- run: "poetry install"
|
- run: "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@v3"
|
- uses: "actions/upload-artifact@v4"
|
||||||
with:
|
with:
|
||||||
name: "logo"
|
name: "logo"
|
||||||
path: "./assets/logo_build"
|
path: "./assets/logo_build"
|
||||||
|
|||||||
28
.github/workflows/deploy.yml
vendored
Normal file
28
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
name: "Deploy"
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
tags:
|
||||||
|
- "v*"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: "write"
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build-and-deploy:
|
||||||
|
concurrency: "ci-${{ github.ref }}" # Recommended if you intend to make multiple deployments in quick succession.
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
steps:
|
||||||
|
- uses: "actions/download-artifact@v4"
|
||||||
|
with:
|
||||||
|
name: "frontend"
|
||||||
|
path: "./public"
|
||||||
|
- uses: "actions/download-artifact@v4"
|
||||||
|
with:
|
||||||
|
name: "logo"
|
||||||
|
path: "./public"
|
||||||
|
- run: "ls -l -R ./public"
|
||||||
|
- uses: "JamesIves/github-pages-deploy-action@v4"
|
||||||
|
with:
|
||||||
|
folder: "public"
|
||||||
|
|
||||||
Reference in New Issue
Block a user