Last active
November 13, 2022 16:44
-
-
Save Pamps/03af7298e3dfffc1fb438979e020599f to your computer and use it in GitHub Desktop.
Example Bitbucket Pipeline CI script to deploy a PHP/WordPress website using FTP.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Auto deploy staging to staging | |
# Manual deploy master to production | |
image: php:7.1.29 | |
pipelines: | |
branches: | |
staging: | |
- step: | |
name: Deploy to Staging | |
script: | |
- echo "Deploy to Staging" | |
- apt-get update -qq && apt-get install -y -qq lftp | |
- lftp -c "set ftp:ssl-allow no; open -u '$STAGING_USER','$STAGING_PASSWORD' '$STAGING_HOST'; mirror -Rnv ./ / --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/" | |
master: | |
- step: | |
script: | |
- echo "Deploy to Production" | |
- step: | |
name: Deploy to Production | |
script: | |
- apt-get update -qq && apt-get install -y -qq lftp | |
- lftp -c "set ftp:ssl-allow no; open -u $PRODUCTION_USER,'$PRODUCTION_PASSWORD' $PRODUCTION_HOST; mirror -Rnv ./ / --ignore-time --parallel=10 --exclude-glob .git* --exclude .git/" | |
trigger: manual |
Hi,
Thanks a lot for your response. Actually, I have tried this way but not working. Maybe I am missing the accurate position to put it. Can you share with me where to put it?
Thanks in advance!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi. You can add additional files/folders to the --exclude command.
So change
--exclude .git/
to
--exclude .git/ --exclude your-file.name