mirror of
https://github.com/yeicor-3d/yet-another-cad-viewer.git
synced 2025-12-19 22:24:17 +01:00
fix deploy workflow 2
This commit is contained in:
21
.github/workflows/deploy.yml
vendored
21
.github/workflows/deploy.yml
vendored
@@ -1,24 +1,35 @@
|
|||||||
name: "Deploy"
|
name: "Deploy"
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
workflow_run:
|
||||||
tags:
|
workflows: ["ci.yml"]
|
||||||
- "v*"
|
types:
|
||||||
|
- "completed"
|
||||||
|
|
||||||
|
|
||||||
permissions:
|
permissions:
|
||||||
contents: "write"
|
contents: "write"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
check-early-exit:
|
||||||
|
runs-on: "ubuntu-latest"
|
||||||
|
outputs:
|
||||||
|
should_deploy: "${{ steps.check-early-exit.outputs.should_deploy }}"
|
||||||
|
steps:
|
||||||
|
- run: "echo ${{ github.ref }}"
|
||||||
|
- run: "echo ${{ github.ref }} | grep -q -v -E '^refs/tags/v[0-9]+\\.[0-9]+\\.[0-9]+$' && echo '::set-output name=should_deploy::false' || echo '::set-output name=should_deploy::true'"
|
||||||
deploy:
|
deploy:
|
||||||
concurrency: "ci-${{ github.ref }}" # Recommended if you intend to make multiple deployments in quick succession.
|
concurrency: "ci-${{ github.ref }}" # Recommended if you intend to make multiple deployments in quick succession.
|
||||||
runs-on: "ubuntu-latest"
|
runs-on: "ubuntu-latest"
|
||||||
|
needs: "check-early-exit"
|
||||||
|
if: "needs.check-early-exit.outputs.should_deploy == 'true'"
|
||||||
steps:
|
steps:
|
||||||
- uses: "actions/download-workflow-artifact@v3"
|
- uses: "dawidd6/action-download-artifact@v3"
|
||||||
with:
|
with:
|
||||||
workflow: "ci.yml"
|
workflow: "ci.yml"
|
||||||
name: "frontend"
|
name: "frontend"
|
||||||
path: "./public"
|
path: "./public"
|
||||||
- uses: "actions/download-workflow-artifact@v3"
|
- uses: "dawidd6/action-download-artifact@v3"
|
||||||
with:
|
with:
|
||||||
workflow: "ci.yml"
|
workflow: "ci.yml"
|
||||||
name: "logo"
|
name: "logo"
|
||||||
|
|||||||
Reference in New Issue
Block a user