Skip to content

Commit

Permalink
fix(docs-site): deploy on commit to master
Browse files Browse the repository at this point in the history
  • Loading branch information
AgentEnder committed May 23, 2021
1 parent 714991b commit e259a28
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tools/scripts/publish-docs-site/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,9 @@ import { execSync } from "child_process";

if (require.main === module) {
const path = joinPathFragments(__dirname, '../../../dist/apps/docs-site');
execSync('git init && git checkout -b "gh-pages" && git add . && git commit -m "chore: deploy docs site" && git remote add origin https://github.com/nx-dotnet/nx-dotnet && git push -f --set-upstream origin gh-pages', {cwd: path, stdio: 'inherit'})
execSync('git init ', {cwd: path, stdio: 'inherit'})
execSync('git checkout -b "gh-pages"', {cwd: path, stdio: 'inherit'})
execSync('git add . && git commit -m "chore: deploy docs site"', {cwd: path, stdio: 'inherit'})
execSync(`git remote add origin https://github-actions:${process.env.GITHUB_TOKEN}@github.com/nx-dotnet/nx-dotnet`, {cwd: path, stdio: 'inherit'})
execSync('git push -f --set-upstream origin gh-pages', {cwd: path, stdio: 'inherit'})
}

0 comments on commit e259a28

Please sign in to comment.