Skip to content

Commit

Permalink
state
Browse files Browse the repository at this point in the history
  • Loading branch information
suziwen committed Dec 11, 2021
1 parent d4d1fa5 commit 5d1cab9
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,14 @@ async function run(): Promise<void> {
const exists = await ioUtil.exists(`${workingDir}/public/.git/config`)
if (!exists) {
await exec.exec(`git init`, [], {cwd: `${workingDir}/public`})
} else {
await exec.exec(`git state`, [], {
cwd: `${workingDir}/public`,
})
await exec.exec(`git branch`, ['--all'], {
cwd: `${workingDir}/public`,
})
await exec.exec(`git switch`, ['-c', `${deployBranch}`], {cwd: `${workingDir}/public`})
}

const gitUserName = core.getInput('git-config-name') || github.context.actor
Expand Down

0 comments on commit 5d1cab9

Please sign in to comment.