Skip to content

Commit

Permalink
Adjusted appdir to remove inital "./" and updated README
Browse files Browse the repository at this point in the history
  • Loading branch information
AkhileshNS committed Jun 15, 2020
1 parent 3de63ac commit 70b5f76
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/[email protected].4 # This is the action
- uses: akhileshns/[email protected].5 # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "YOUR APP's NAME" #Must be unique in Heroku
Expand Down
9 changes: 8 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,15 @@ const deploy = ({
if (appdir === "") {
execSync(`git push heroku ${branch}:refs/heads/master ${force}`);
} else {
const Appdir =
appdir[0] === "." && appdir[1] === "/"
? appdir.slice(2)
: appdir[0] === "/"
? appdir.slice(1)
: appdir;

execSync(
`git push ${force} heroku \`git subtree split --prefix=${appdir} ${branch}\`:refs/heads/master`
`git push ${force} heroku \`git subtree split --prefix=${Appdir} ${branch}\`:refs/heads/master`
);
}
}
Expand Down

0 comments on commit 70b5f76

Please sign in to comment.