Skip to content

Commit 0d8590c

Browse files
committed
fix cd.yml
- add missing NBVIEWER_CHART env - clone nbviewer with actions/checkout
1 parent 5825cb5 commit 0d8590c

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

.github/workflows/cd.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
name: Continuous Deployment
1+
name: Deploy
22

33
# only allow one deploy workflow to be running at a time
44
# serializes multiple outstanding deploys if PRs are merged before the last deploy finishes
55
# ref: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#concurrency
66
concurrency: deploy
77

8-
# Only trigger the workflow when pushing to master or a label is applied to a
9-
# Pull Request
8+
# Only trigger the workflow when pushing to main
109
on:
1110
push:
1211
branches:
@@ -23,6 +22,7 @@ env:
2322
HELM_VERSION: "v3.12.0"
2423
KUBECONFIG: secrets/ovh-kubeconfig.yaml
2524
NBVIEWER_VERSION: "68472ab"
25+
NBVIEWER_CHART: nbviewer/helm-chart/nbviewer
2626

2727
jobs:
2828
# In this dedicated job to deploy our staging environment we build and push
@@ -32,27 +32,34 @@ jobs:
3232

3333
steps:
3434
- name: Checkout repo
35-
uses: actions/checkout@v4
35+
uses: actions/checkout@v5
3636
with:
3737
fetch-depth: 0
3838

39+
- name: Checkout nbviewer
40+
uses: actions/checkout@v5
41+
with:
42+
repository: jupyter/nbviewer
43+
ref: ${{ env.NBVIEWER_VERSION }}
44+
path: nbviewer
45+
3946
- name: Setup Python
4047
uses: actions/setup-python@v5
4148
with:
4249
python-version: "3.13"
4350
cache: pip
4451

45-
- name: "Stage 1: Install dependencies"
52+
- name: Install dependencies
4653
run: |
4754
pip install --upgrade setuptools pip
4855
pip install --upgrade -r requirements.txt
4956
50-
- name: "Stage 1: Install kubectl ${{ env.KUBECTL_VERSION }}"
57+
- name: Install kubectl
5158
uses: azure/setup-kubectl@v4
5259
with:
5360
version: ${{ env.KUBECTL_VERSION }}
5461

55-
- name: "Stage 1: Install and setup helm ${{ env.HELM_VERSION }}"
62+
- name: Install and setup helm
5663
run: |
5764
curl -sf https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | DESIRED_VERSION=${HELM_VERSION} bash
5865
@@ -61,17 +68,10 @@ jobs:
6168
env:
6269
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
6370

64-
- name: get nbviewer chart
65-
run: |
66-
git clone https://github.com/jupyter/nbviewer
67-
cd nbviewer
68-
git reset "${NBVIEWER_VERSION}" --hard
69-
git log -1
70-
7171
- name: deploy
7272
run: |
7373
bash deploy.sh
7474
75-
- name: "Test"
75+
- name: test
7676
run: |
7777
pytest

0 commit comments

Comments
 (0)