Skip to content

Instantly share code, notes, and snippets.

@tomstorms
Last active April 30, 2022 04:43
Show Gist options
  • Save tomstorms/242b7b07579921b61b0b4ffa7975a679 to your computer and use it in GitHub Desktop.
Save tomstorms/242b7b07579921b61b0b4ffa7975a679 to your computer and use it in GitHub Desktop.
#-----------------------------------------------------
# Deploy master branch to production
# Upload your BitBucket repo via FTP to a remote server
`
image: atlassian/default-image:3
pipelines:
branches:
master:
- step:
deployment: production
script:
- pipe: atlassian/ftp-deploy:0.3.7
variables:
USER: $FTP_USER
PASSWORD: $FTP_PASS
SERVER: $FTP_SERVER
REMOTE_PATH: '/'
EXTRA_ARGS: "--exclude=.git/ --exclude=*.yml --exclude=somefolder/"
`
Note: Define $FTP_USER, $FTP_PASS, $FTP_SERVER variables in BitBucket pipeline settings
Use the following EXTRA_ARGS for WordPress instances:
`
EXTRA_ARGS: "--exclude=.git/ --exclude=*.yml --exclude-glob=somefolder/ --exclude=wp-includes/ --exclude=wp-admin/ --exclude=wp-content/plugins/ --exclude=wp-content/mu-plugins/ --exclude=wp-content/uploads/ --exclude=wp-content/languages/ --exclude-glob=wp-*.php --exclude=xmlrpc.php"
`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment