11name : gallery
22
33on :
4- workflow_run :
4+ workflow_run : # zizmor: ignore[dangerous-triggers]
55 workflows : [packages]
66 types :
77 - completed
88 workflow_dispatch :
99 inputs :
1010 target :
11- description : ' Build and deploy gallery'
11+ description : " Build and deploy gallery"
1212 type : choice
1313 options :
14- - dev
15- - main
16- - dryrun
14+ - dev
15+ - main
16+ - dryrun
1717 required : true
1818 default : dryrun
1919
20+ permissions : {}
21+
22+ concurrency :
23+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
24+ cancel-in-progress : true
25+
2026jobs :
2127 deploy_gallery :
2228 name : Gallery
@@ -29,14 +35,15 @@ jobs:
2935 uses : actions/checkout@v6
3036 with :
3137 fetch-depth : 0
38+ persist-credentials : false
3239 - name : Set and echo git ref
3340 id : vars
3441 env :
3542 HEAD_BRANCH : ${{ github.event.workflow_run.head_branch }}
3643 run : |
3744 echo "Deploying from ref $HEAD_BRANCH"
3845 echo "tag=$HEAD_BRANCH" >> $GITHUB_OUTPUT
39- - uses : conda-incubator/setup-miniconda@v3
46+ - uses : conda-incubator/setup-miniconda@v4
4047 with :
4148 miniconda-version : " latest"
4249 auto-update-conda : true
@@ -60,12 +67,14 @@ jobs:
6067 (github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'dev') ||
6168 (github.event_name == 'workflow_run' && (contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')))
6269 )
70+ env :
71+ TAG : ${{ steps.vars.outputs.tag || '0.0.1dev' }}
6372 run : |
6473 conda activate test
6574 ae5 login --hostname holoviz-demo.anaconda.com --username ${{ secrets.AE5_USERNAME }} --password ${{ secrets.AE5_PASSWORD }}
6675 ae5 deployment stop panel-gallery-dev --yes || :
6776 ae5 project delete panel-gallery-dev --yes || :
68- ae5 project upload examples/gallery --name panel-gallery-dev --tag ${{ steps.vars.outputs.tag || '0.0.1dev' }}
77+ ae5 project upload examples/gallery --name panel-gallery-dev --tag "${TAG}"
6978 ae5 deployment start panel-gallery-dev --endpoint panel-gallery-dev --command dev --public --resource-profile large --wait
7079 - name : Upload and deploy prod gallery
7180 if : |
@@ -74,10 +83,12 @@ jobs:
7483 (github.event_name == 'workflow_dispatch' && github.event.inputs.target == 'main') ||
7584 (github.event_name == 'workflow_run' && !(contains(steps.vars.outputs.tag, 'a') || contains(steps.vars.outputs.tag, 'b') || contains(steps.vars.outputs.tag, 'rc')) && contains(steps.vars.outputs.tag, 'v'))
7685 )
86+ env :
87+ TAG : ${{ steps.vars.outputs.tag }}
7788 run : |
7889 conda activate test
7990 ae5 login --hostname holoviz-demo.anaconda.com --username ${{ secrets.AE5_USERNAME }} --password ${{ secrets.AE5_PASSWORD }}
8091 ae5 deployment stop panel-gallery --yes || :
8192 ae5 project delete panel-gallery --yes || :
82- ae5 project upload examples/gallery --name panel-gallery --tag ${{ steps.vars.outputs.tag }}
93+ ae5 project upload examples/gallery --name panel-gallery --tag "${TAG}"
8394 ae5 deployment start panel-gallery --endpoint panel-gallery --command prod --public --resource-profile extra_large --wait
0 commit comments