Skip to content

Commit 4b69388

Browse files
simonebyyx990803
authored andcommitted
docs: add bitbucket cloud deployment documentation (#2256)
1 parent 403727e commit 4b69388

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

docs/guide/deployment.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,3 +273,36 @@ Then cd into the `dist/` folder of your project and then run `surge` and follow
273273
```
274274

275275
Verify your project is successfully published by Surge by visiting `myawesomeproject.surge.sh`, vola! For more setup details such as custom domains, you can visit [Surge's help page](https://surge.sh/help/).
276+
277+
### Bitbucket Cloud
278+
279+
1. As described in the [Bitbucket documentation](https://confluence.atlassian.com/bitbucket/publishing-a-website-on-bitbucket-cloud-221449776.html) you need to create a repository named exactly `<USERNAME>.bitbucket.io`.
280+
281+
2. It is possible to publish to a subfolder of the main repository, for instance if you want to have multiple websites. In that case set correct `baseUrl` in `vue.config.js`.
282+
283+
If you are deploying to `https://<USERNAME>.bitbucket.io/`, you can omit `baseUrl` as it defaults to `"/"`.
284+
285+
If you are deploying to `https://<USERNAME>.bitbucket.io/<SUBFOLDER>/`, set `baseUrl` to `"/<SUBFOLDER>/"`. In this case the directory structure of the repository should reflect the url structure, for instance the repository should have a `/<SUBFOLDER>` directory.
286+
287+
3. Inside your project, create `deploy.sh` with the following content and run it to deploy:
288+
289+
``` bash{13,20,23}
290+
#!/usr/bin/env sh
291+
292+
# abort on errors
293+
set -e
294+
295+
# build
296+
npm run build
297+
298+
# navigate into the build output directory
299+
cd dist
300+
301+
git init
302+
git add -A
303+
git commit -m 'deploy'
304+
305+
git push -f git@bitbucket.org:<USERNAME>/<USERNAME>.bitbucket.io.git master
306+
307+
cd -
308+
```

0 commit comments

Comments
 (0)