Skip to content

Commit

Permalink
feat: add current Node version to CI yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertPechaCZ committed Nov 19, 2024
1 parent 259a5ca commit a192fb0
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions src/commands/sites/utils/prepareGitHubActionsIntegration.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
import { join as joinPath } from 'node:path';

import { generateDeploymentWorkflowYaml } from '@fleek-platform/utils-github';
import { parse as parseSemver } from 'semver';

import type { Output } from '../../../output/Output';
import { fileExists } from '../../../utils/fs';
Expand All @@ -10,14 +12,8 @@ import { requestDeploymentWorkflowInstallCommand } from './requestDeploymentWork
import { saveDeploymentWorkflowYaml } from './saveDeploymentWorkflowYaml';

export const ghWorkflowFilename = 'fleek-deploy.yaml';
export const ghActionsWorflowsDirectory = joinPath(
process.cwd(),
'.github/workflows',
);
export const ghActionsDeploySitesYamlPath = joinPath(
ghActionsWorflowsDirectory,
ghWorkflowFilename,
);
export const ghActionsWorflowsDirectory = joinPath(process.cwd(), '.github/workflows');
export const ghActionsDeploySitesYamlPath = joinPath(ghActionsWorflowsDirectory, ghWorkflowFilename);

type PrepareGitHubActionsIntegrationArgs = {
personalAccessToken: string;
Expand All @@ -34,6 +30,7 @@ export const prepareGitHubActionsIntegration = async ({
}: PrepareGitHubActionsIntegrationArgs) => {
const installCommand = await requestDeploymentWorkflowInstallCommand();
const yamlContent = generateDeploymentWorkflowYaml({
nodeVersion: parseSemver(process.version)?.major ?? 18,

Check failure on line 33 in src/commands/sites/utils/prepareGitHubActionsIntegration.ts

View workflow job for this annotation

GitHub Actions / build

Argument of type '{ nodeVersion: number; fleekConfigPath: string | undefined; installCommand: string | undefined; }' is not assignable to parameter of type 'GenerateDeploymentWorkflowYamlArgs'.
fleekConfigPath,
installCommand,
});
Expand Down

0 comments on commit a192fb0

Please sign in to comment.