Symlink only listed READMEs to index.html
A more sophisticated solution of !1494 (merged).
Only symlink files according to upstream branches. This essentially replaces:
for i in `find public -name README.html`; do ln -sf README.html $(dirname $i)/index.html; done
with a raketask. The results of find
are listed in a YAML file, and we parse that to create the symlinks.
To simulate locally when a pipeline is triggered from an upstream branch:
CI_COMMIT_REF_NAME=docs-preview-runner-upstream-branch CI_DEFAULT_BRANCH=master BRANCH_RUNNER=upstream-branch CI_PIPELINE_SOURCE=pipeline bundle exec rake symlink_readmes
To remove the symlinks and try different combinations:
find -L public -xtype l | xargs rm