Add support to not skip build for deploy



Add support to not skip build for deploy even if it has [ci skip] or something like this. This is because sometimes new tag will not be deployed because it’s last commit is marked as skipped.

There could be something like this allow_skip: false in config file:

  allow_skip: false
  skip_cleanup: true
    tags: true

This is from GitHub issue #10357.


What is preventing you from tagging before or after the [skip ci] commit?


This would be in case if someone forgot to do this. Also, this commit should be included in tag, so I would need to add some useless or empty commits to enable build.


There are competing conditions here, one that says “skip this commit”, and one that says “run this build”. It would be equally confusing if there is a [skip ci] commit that actually runs.


I will try to provide more details…

I have Travis CI config that will build documentation (and some other files) after every successful test and publish it back to GitHub. The problem is that I must publish it with [skip ci] because it will again run the build if I don’t, so there will be infinity recursion. But if I mark that commit as skipped, it’s tag will not be builder and published to NPM.

If this is not possible, what can I do? That commits must be included in tag, so I would have to manually add new empty commits. But this could be a problem because they could again cause new documentation commits.


How are you building the docs?


Something tells me you should keep generated files separately from source files. E.g. for binaries, there’s Releases and for docs, Github Pages. Nothing stops you from publishing nightly builds and/or documentation for HEAD.


For could publish docs to GitHub Pages, but other thing needs to be included into source code so I need to add it with commit.

I think it is easier to provide you what am I actually doing.
In my project, I have Travis CI config file, which downloads smart contract file to source code and builds documentation to docs directory (which as actually published to GitHub Pages).
This works normally, but I have to add [ci skip] to commit message because it will re build it if I don’t. The problem is that it because of skipped commit, new tag will not be builded and published to NPM.


I think I know what should I do.

I could build and publish documentation using GitHub Pages Deployment instead of classic commit and push.

I still don’t know how to update smart contract file, but maybe I could manually update it when needed.

Is this OK? Will it work the way I want?


I would add build logic that detects if the contract file is up to date and do not rebuild and commit then. That would make [skip ci] unneeded.

You can also detect if a build was triggered by a tag by looking at TRAVIS_BRANCH and/or TRAVIS_TAG if you need any special handling in such a case.