Skip to content

Commit f45f415

Browse files
committed
add action boilerplate
1 parent f403720 commit f45f415

File tree

4 files changed

+24
-4
lines changed

4 files changed

+24
-4
lines changed

action.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: "Generate Docs"
33
description: "Generate docs from markdown"
44

55
inputs:
6-
type:
7-
description: "the release type"
8-
required: false
96
repo:
107
description: "the target repo of the docs"
118
required: true

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
},
2121
"homepage": "https://github.com/sveltejs/action-deploy-docs#readme",
2222
"devDependencies": {
23+
"@actions/core": "^1.2.6",
2324
"@rollup/plugin-commonjs": "^17.1.0",
2425
"@rollup/plugin-node-resolve": "^11.2.0",
2526
"@sindresorhus/slugify": "^1.1.0",

pnpm-lock.yaml

Lines changed: 6 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,19 @@
1-
async function run() {}
1+
import core from "@actions/core";
2+
3+
async function run() {
4+
const target_repo = core.getInput("repo");
5+
const target_branch = core.getInput("branch");
6+
const cf_token = core.getInput("token");
7+
8+
if (target_branch !== "main" && target_branch !== "master") {
9+
core.setFailed("Branch deploys are not yet supported.");
10+
}
11+
12+
// get repo
13+
// read docs in
14+
// format them
15+
// transform to cf format (batch keys)
16+
// write to cloudflare
17+
}
218

319
run();

0 commit comments

Comments
 (0)