It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Can I deploy artifacts to Bitbucket Pages?

Carlos González Dec 20, 2016

As I stated here before:, would it be possible to deploy artifacts to Bitbucket Pages, similarly to Gitlab Pages?

1 answer

1 accepted

1 vote
Answer accepted
Thomas Bradshaw Atlassian Team Dec 20, 2016

Hi @Carlos González,

Bitbucket pages uses items from the repository. The easiest way to accomplish this is to build your artifact and then add the artifact, commit and push it back to the repository within the pipeline. If you do this the artifact should be added automatically.

To do this you will need a bitbucket-pipelines.yml that looks something like this

    - step:
		- addSshKeyToKeychainScript
        - generateArtifactScript
        - git config --global "<email>"
        - git config --global "<name>"
        - git config --global push.default simple
        - git add artifact
        - git commit -m '<message>'
        - git remote add origin2 <bitbucket repository url>
        - git push origin2 master

I would recommend using the ssh based repository url and an ssh key to authenticate the push (the addSshKeyToKeychainScript item in the yml). For more information about using ssh in pipelines please consult the documentation here and here



Carlos González Dec 20, 2016

Thanks for the quick answer! For this moment it seems a little complicated for me, but i'll give a try on a test repo.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Published in Bitbucket Pipelines

Building a Bitbucket Pipe as a casual coder :  #!/bin/bash source "$(dirname "$0")/" enable_debug extra_args="" if [[ "${DEBUG}" == "true" ]]; then extra_args="--verbose" fi # mandatory variables R...

1,975 views 1 19
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you