Skip to content

Instantly share code, notes, and snippets.

@barryvdh
Last active December 4, 2023 22:42
Show Gist options
  • Save barryvdh/0042fc66607aa84802f2e6a4537bb586 to your computer and use it in GitHub Desktop.
Save barryvdh/0042fc66607aa84802f2e6a4537bb586 to your computer and use it in GitHub Desktop.
Bitbucket Pipeline config for Laravel Vapor, make sure to `composer require laravel/vapor-cli` and set the VAPOR_API_TOKEN environment var.
image: smartapps/bitbucket-pipelines-debian-10
pipelines:
branches:
master:
- step:
name: Deploy Test
deployment: test
script:
- composer install --no-interaction --no-progress --prefer-dist
- /usr/bin/php vendor/bin/vapor deploy test --commit="$BITBUCKET_COMMIT"
- step:
name: Deploy Staging
deployment: staging
trigger: manual
script:
- composer install --no-interaction --no-progress --prefer-dist
- /usr/bin/php vendor/bin/vapor deploy staging --commit="$BITBUCKET_COMMIT"
- step:
name: Deploy Production
deployment: production
trigger: manual
script:
- composer install --no-interaction --no-progress --prefer-dist
- /usr/bin/php vendor/bin/vapor deploy production --commit="$BITBUCKET_COMMIT"
@sumitchavan378
Copy link

@barryvdh @paccamicio can you please provide the step by step details to set up the pipeline for laravel vapor

@medteck
Copy link

medteck commented Mar 9, 2022

I'm having this error :

+ /usr/bin/php vendor/bin/vapor deploy staging --commit="$BITBUCKET_COMMIT"
Could not open input file: vendor/bin/vapor

@barryvdh
Copy link
Author

barryvdh commented Mar 9, 2022

Do you have vapor installed?

@medteck
Copy link

medteck commented Mar 9, 2022

Never mind! It was my [dumb] error, Vapor was install as a global package on my machine and did not figure as a dependency.

@medteck
Copy link

medteck commented Mar 10, 2022

I suggest using a different docker image. This one's php & node versions are not compatible with the most recent laravel's default versions.
Here's an example: https://gist.github.com/medteck/b6fbb615d815c1b041633a898f89b59e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment