Skip to content

Commit baf821d

Browse files
committedAug 8, 2024
checkout defang and samples in sibling directories
to mirror the configuration in our development environments
1 parent fc62c20 commit baf821d

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed
 

‎.github/workflows/deploy.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,14 @@ jobs:
4444
uses: actions/checkout@v3
4545
with:
4646
repository: DefangLabs/defang
47-
path: defang
47+
path: ../defang
4848
ref: ${{ github.event_name == 'repository_dispatch' && github.event.client_payload.version || 'main' }}
4949

5050
- name: Checkout DefangLabs/samples
5151
uses: actions/checkout@v3
5252
with:
5353
repository: DefangLabs/samples
54-
path: samples
54+
path: ../samples
5555
ref: main
5656

5757
- name: Set up Go

‎.github/workflows/test-deploy.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ jobs:
2525
uses: actions/checkout@v3
2626
with:
2727
repository: DefangLabs/defang
28-
path: defang
28+
path: ../defang
2929
ref: main
3030

3131
- name: Checkout DefangLabs/samples
3232
uses: actions/checkout@v3
3333
with:
3434
repository: DefangLabs/samples
35-
path: samples
35+
path: ../samples
3636
ref: main
3737

3838
- name: Set up Go

‎scripts/prebuild.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -e
44

5-
cd defang/src/cmd/gendocs && go run main.go ../../../defang-docs/docs/cli
5+
cd ../defang/src/cmd/gendocs && go run main.go ../../../../defang-docs/docs/cli
66
cd -
77
node scripts/prep-cli-docs.js
88
node scripts/prep-samples.js

‎scripts/prep-samples.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const fs = require('fs');
22
const path = require('path');
33
const YAML = require('yaml');
44

5-
const samplesDir = path.join(__dirname, '..', 'samples', 'samples');
5+
const samplesDir = path.join(__dirname, '..', '..', 'samples', 'samples');
66

77
// categories are directories in the current directory (i.e. we're running in samples/ and we might have a samples/ruby/ directory)
88
const directories = fs.readdirSync(samplesDir).filter(file => fs.statSync(path.join(samplesDir, file)).isDirectory());
@@ -20,11 +20,11 @@ directories.forEach((sample) => {
2020
}
2121

2222
// The readme should contain lines that start with the following:
23-
// Title:
24-
// Short Description:
25-
// Tags:
26-
// Languages:
27-
//
23+
// Title:
24+
// Short Description:
25+
// Tags:
26+
// Languages:
27+
//
2828
// We want to extract the title, short description, tags, and languages from the readme. Tags and languages are comma separated lists.
2929
const title = readme.match(/Title: (.*)/)[1];
3030
const shortDescription = readme.match(/Short Description: (.*)/)[1];

0 commit comments

Comments
 (0)
Failed to load comments.