mirror of
https://github.com/JamesIves/github-pages-deploy-action.git
synced 2023-12-15 20:03:39 +08:00
git fetch
This commit is contained in:
parent
b7e33f69fd
commit
3ddbf41de7
@ -36,7 +36,7 @@ function init() {
|
|||||||
yield execute_1.execute(`git init`, constants_1.workspace);
|
yield execute_1.execute(`git init`, constants_1.workspace);
|
||||||
yield execute_1.execute(`git config user.name ${constants_1.action.name}`, constants_1.workspace);
|
yield execute_1.execute(`git config user.name ${constants_1.action.name}`, constants_1.workspace);
|
||||||
yield execute_1.execute(`git config user.email ${constants_1.action.email}`, constants_1.workspace);
|
yield execute_1.execute(`git config user.email ${constants_1.action.email}`, constants_1.workspace);
|
||||||
yield execute_1.execute(`git fetch ${constants_1.repositoryPath}`, constants_1.workspace);
|
yield execute_1.execute(`git fetch`, constants_1.workspace);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(`There was an error initializing the repository: ${error}`);
|
core.setFailed(`There was an error initializing the repository: ${error}`);
|
||||||
@ -69,6 +69,7 @@ function generateBranch() {
|
|||||||
yield execute_1.execute(`git reset --hard`, constants_1.workspace);
|
yield execute_1.execute(`git reset --hard`, constants_1.workspace);
|
||||||
yield execute_1.execute(`git commit --allow-empty -m "Initial ${constants_1.action.branch} commit."`, constants_1.workspace);
|
yield execute_1.execute(`git commit --allow-empty -m "Initial ${constants_1.action.branch} commit."`, constants_1.workspace);
|
||||||
yield execute_1.execute(`git push ${constants_1.repositoryPath} ${constants_1.action.branch}`, constants_1.workspace);
|
yield execute_1.execute(`git push ${constants_1.repositoryPath} ${constants_1.action.branch}`, constants_1.workspace);
|
||||||
|
yield execute_1.execute(`git fetch`, constants_1.workspace);
|
||||||
}
|
}
|
||||||
catch (error) {
|
catch (error) {
|
||||||
core.setFailed(`There was an error creating the deployment branch: ${error} ❌`);
|
core.setFailed(`There was an error creating the deployment branch: ${error} ❌`);
|
||||||
|
@ -26,7 +26,7 @@ export async function init(): Promise<any> {
|
|||||||
await execute(`git init`, workspace);
|
await execute(`git init`, workspace);
|
||||||
await execute(`git config user.name ${action.name}`, workspace);
|
await execute(`git config user.name ${action.name}`, workspace);
|
||||||
await execute(`git config user.email ${action.email}`, workspace);
|
await execute(`git config user.email ${action.email}`, workspace);
|
||||||
await execute(`git fetch ${repositoryPath}`, workspace);
|
await execute(`git fetch`, workspace);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(`There was an error initializing the repository: ${error}`);
|
core.setFailed(`There was an error initializing the repository: ${error}`);
|
||||||
} finally {
|
} finally {
|
||||||
@ -62,6 +62,7 @@ export async function generateBranch(): Promise<any> {
|
|||||||
workspace
|
workspace
|
||||||
);
|
);
|
||||||
await execute(`git push ${repositoryPath} ${action.branch}`, workspace);
|
await execute(`git push ${repositoryPath} ${action.branch}`, workspace);
|
||||||
|
await execute(`git fetch`, workspace);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
core.setFailed(
|
core.setFailed(
|
||||||
`There was an error creating the deployment branch: ${error} ❌`
|
`There was an error creating the deployment branch: ${error} ❌`
|
||||||
|
Loading…
Reference in New Issue
Block a user