1

My plan is to use Bitbucket Cloud as a static web host for my single page application built with the Vue-Cli (VueJS).

In the process, I wanted to setup Bitbucket's Pipeline feature so I can commit code that would automatically deploy to my repo at https://<username>.bitbucket.io

I am trying to deploy a production build from my single page application that has a "/dist" folder for deployment. It contains the mandatory index.html file for static web hosting to work.

The bitbucket Build Setup step contains the following:

`git config http.${BITBUCKET_GIT_HTTP_ORIGIN}.proxy http://localhost:29418/`
`git remote set-url origin http://bitbucket.org/<username>/<username>.bitbucket.io`

Where <username> contains my actual bitbucket username.

Here's my bitbucket-pipelines.yml

image: node:8.12.0

pipelines:
  default:
    - step:
caches:
  - node
script: 
  - npm install
  - npm rebuild node-sass
  - npm run build
  - cd dist
  - git add -A
  - git commit -m 'deploy build'
  - git push -f ${BITBUCKET_GIT_HTTP_ORIGIN} master
  - cd -

Did I use the ${BITBUCKET_GIT_HTTP_ORIGIN} variable correctly here?

I don't get an error in the pipelines dashboard at Bitbucket other than STATUS: FAILED with nothing to commit:

    git commit -m 'deploy build'
+ git commit -m 'deploy build'
On branch master
Your branch is up-to-date with 'origin/master'.
nothing to commit, working directory clean

Thanks for any pointers anyone can provide.

redshift
  • 4,815
  • 13
  • 75
  • 138
  • 1
    Do you have a .gitignore file in that repo? – Jim Redmond Dec 31 '18 at 19:48
  • @JimRedmond that was actually part of the problem. However, still had another issue...but the good news is that during this process I discovered Netlify! Makes my life much easier..so I guess we can close this question. – redshift Dec 31 '18 at 20:03
  • 1
    Let's see if we can answer this for anybody else who encounters your problem, though. The .gitignore was preventing you from committing anything, right? If that's the case, then the commit step would fail (nothing to commit), and if commit fails then there's no point in trying to push. – Jim Redmond Dec 31 '18 at 20:05
  • did you manage then? – xdemocle Jun 10 '20 at 19:48

0 Answers0