Skip to content

Commit f4c0da3

Browse files
committed
github pipeline
1 parent 41232e4 commit f4c0da3

File tree

3 files changed

+132
-4
lines changed

3 files changed

+132
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Deploy
2+
on:
3+
push:
4+
branches: main
5+
pull_request:
6+
branches: main
7+
8+
jobs:
9+
deploy:
10+
name: Deploy
11+
runs-on: ubuntu-latest
12+
13+
permissions:
14+
id-token: write # Needed for auth with Deno Deploy
15+
contents: read # Needed to clone the repository
16+
17+
steps:
18+
- name: Clone repository
19+
uses: actions/checkout@v4
20+
21+
- name: Install Deno
22+
uses: denoland/setup-deno@v2
23+
with:
24+
deno-version: v2.x
25+
26+
- name: Lint Deno code
27+
run: deno fmt --check
28+
29+
- name: Test Deno code
30+
run: deno test
31+
32+
- name: Build step
33+
run: "deno task build"

deno.lock

Lines changed: 90 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

git-mirror.ts

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,11 @@ interface CloneOptions {
2020
}
2121

2222
const cloneAction = async (options: CloneOptions, repo: string) => {
23-
console.log(colors.bgYellow('Dry run mode ... none of the commands will actually be run.'));
23+
console.log(
24+
colors.bgYellow(
25+
"Dry run mode ... none of the commands will actually be run.",
26+
),
27+
);
2428

2529
const localRepo = getLocalPath(
2630
repo,
@@ -33,7 +37,9 @@ const cloneAction = async (options: CloneOptions, repo: string) => {
3337
const dirAlreadyExists = await exists(localRepo);
3438
if (dirAlreadyExists) {
3539
if (options.dryRun) {
36-
console.log(colors.yellow(`> Dry run: Fetching repository: ${localRepo}`));
40+
console.log(
41+
colors.yellow(`> Dry run: Fetching repository: ${localRepo}`),
42+
);
3743
} else {
3844
await fetchRepo(localRepo);
3945
}
@@ -73,7 +79,7 @@ const cloneAction = async (options: CloneOptions, repo: string) => {
7379

7480
await new Command()
7581
.name("clone")
76-
.version("0.1.5")
82+
.version("0.1.6")
7783
.description("Clone/Fetch a Git repository into a 'Projects' directory")
7884
.arguments("<repo:string>")
7985
.option("-r, --root <rootDir>", "The root directory.", {

0 commit comments

Comments
 (0)