[英]Git ftp: How to upload the "build" folder while it is ignored in .gitignore?
My project uses git
to source on bitbuckets and git-ftp
to deploy the build on an FTP.我的项目使用git
在 bitbuckets 上获取源代码,并使用git-ftp
在git-ftp
上部署构建。
I want to:我想要:
build
folder on the ftp仅跟踪 ftp 上的build
文件夹By now I have:现在我有:
.gitignore
: build
在.gitignore
: build
.git-ftp-ignore
: *
在.git-ftp-ignore
: *
.git-ftp-include
: build/*
在.git-ftp-include
: build/*
But the command git ftp push
return an message但是命令git ftp push
返回一条消息
There are no files to sync.
Last deployment changed from to b0d3d2797796a0bc3c47d0aa128a3abc4cbef9e5.
Here is what I did这是我所做的
In bitbucket-pipelines.yml file在bitbucket-pipelines.yml文件中
image: node:10.15.3
pipelines:
default:
- step:
caches:
- node
name: Installing
script:
- npm install
- npm run build
- apt-get update
- apt-get -qq install git-ftp
- git ftp push --syncroot ./build --user $FTP_USERNAME --passwd $FTP_PASSWORD $FTP_SERVER
And then added a .git-ftp-include file which only contains然后添加了一个.git-ftp-include文件,其中只包含
!./build
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.