no checkout when no commit hash
This commit is contained in:
8
pnpm-lock.yaml
generated
8
pnpm-lock.yaml
generated
@@ -18,9 +18,6 @@ importers:
|
||||
specifier: ^3.0.0
|
||||
version: 3.0.0
|
||||
devDependencies:
|
||||
'@octokit/webhooks-types':
|
||||
specifier: ^7.6.1
|
||||
version: 7.6.1
|
||||
'@types/bun':
|
||||
specifier: latest
|
||||
version: 1.3.3
|
||||
@@ -30,9 +27,6 @@ packages:
|
||||
'@borewit/text-codec@0.1.1':
|
||||
resolution: {integrity: sha512-5L/uBxmjaCIX5h8Z+uu+kA9BQLkc/Wl06UGR5ajNRxu+/XjonB5i8JpgFMrPj3LXTCPA0pv8yxUvbUi+QthGGA==}
|
||||
|
||||
'@octokit/webhooks-types@7.6.1':
|
||||
resolution: {integrity: sha512-S8u2cJzklBC0FgTwWVLaM8tMrDuDMVE4xiTK4EYXM9GntyvrdbSoxqDQa+Fh57CCNApyIpyeqPhhFEmHPfrXgw==}
|
||||
|
||||
'@sinclair/typebox@0.34.41':
|
||||
resolution: {integrity: sha512-6gS8pZzSXdyRHTIqoqSVknxolr1kzfy4/CeDnrzsVz8TTIWUbOBr6gnzOmTYJ3eXQNh4IYHIGi5aIL7sOZ2G/g==}
|
||||
|
||||
@@ -133,8 +127,6 @@ snapshots:
|
||||
|
||||
'@borewit/text-codec@0.1.1': {}
|
||||
|
||||
'@octokit/webhooks-types@7.6.1': {}
|
||||
|
||||
'@sinclair/typebox@0.34.41': {}
|
||||
|
||||
'@tokenizer/inflate@0.4.1':
|
||||
|
||||
@@ -7,7 +7,7 @@ import { rebuildCaddyfile } from "./caddy";
|
||||
|
||||
type DeployInstance = {
|
||||
host: string;
|
||||
commitHash: string;
|
||||
commitHash?: string;
|
||||
};
|
||||
|
||||
export const deploy = async ({ host, commitHash }: DeployInstance) => {
|
||||
@@ -29,7 +29,7 @@ export const deploy = async ({ host, commitHash }: DeployInstance) => {
|
||||
$.cwd(path.join(serviceDir, "src"));
|
||||
await $`git fetch origin ${branch}`;
|
||||
await $`git reset --hard origin/${branch}`;
|
||||
await $`git checkout ${commitHash}`;
|
||||
commitHash && (await $`git checkout ${commitHash}`);
|
||||
|
||||
// Build
|
||||
await $`make build`;
|
||||
|
||||
@@ -2,5 +2,4 @@ import { deploy } from "../deploy";
|
||||
|
||||
await deploy({
|
||||
host: "deployer2",
|
||||
commitHash: "",
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user