MelbDev
MelbDev

Reputation: 365

Bitbucket pipeline - Unable to deploy dist folder to my server

I am trying to deploy a wordpress theme to server through bitbucket pipeline, it is working fine but it's not deploying dist folder. I think it's because I have dist folder added in my .gitignore file

Here's my bitbucket-pipelines.yml file

    - step:

        name: 'Deployment to Production'

        image: node:10.16.2

        deployment: production

        trigger: 'manual'

        script:

          - npm install

          - npm test

          - yarn

          - yarn build:production

          - apt-get update

          - apt-get -qq install git-ftp

          - git ftp push --insecure --user $FTP_USER --passwd $FTP_PASS ftpes://ftp.mydomain.dev/public_html/wp-content/themes/cule --all

am i missing anything? should I remove dist folder from my .gitignore file?

Here's my .gitignore file

.gitignore

.cache-loader
npm-debug.log
yarn-error.log
resources/assets/config-local.json
node_modules
dist

Upvotes: 1

Views: 1349

Answers (1)

hexbioc
hexbioc

Reputation: 1606

git-ftp will push all the untracked files and folders listed in the .git-ftp-include file. This is documented here.

At the bare minimum, your repository could be configured to always push the dist folder by adding a file named .git-ftp-include at the repository root with the following content:

!dist/

The documentation enlists more options to conditionally update the dist folder.

Upvotes: 2

Related Questions