Skip to content

Commit

Permalink
Updating workflow using symlinks command
Browse files Browse the repository at this point in the history
  • Loading branch information
cason committed Sep 29, 2023
1 parent 935ab9c commit 94b34da
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ jobs:
run: |
chmod a+wx .
bundle exec jekyll build --disable-disk-cache -V
# Create _pages/version/docs link
- name: Add symbolic links
run: make symlinks
# Deploy the _site folder to Netlify CometBFT documentation website
- name: Deploy to Netlify
uses: nwtgck/[email protected]
Expand Down
11 changes: 7 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,17 @@ build:
@rm -rf _site
@docker run -it --rm --volume ${PWD}:/srv/jekyll jekyll/builder:stable \
/bin/bash -c 'cd /srv/jekyll/ && bundle install && bundle exec jekyll build --future -V '
@rm -rf _site/build
.PHONY: build

symlinks:
@if [ ! -d "_pages" ]; then echo "Directory _pages does not exist. Please run \"make fetch\" before running this command"; exit 1; fi
@while read -r branch output_path visible ; do \
ln -s . _site/$${output_path}/docs ; \
[ -L _site/$${output_path}/docs ] || ln -vs . _site/$${output_path}/docs ; \
done < VERSIONS
@if [ "${LOCAL_DOCS_REPO}" ]; then \
ln -s . _site/dev/docs ; \
[ -L_site/dev/docs ] || ln -vs . _site/dev/docs ; \
fi
@rm -rf _site/build
.PHONY: build

# Creates _data/versions.yml, which is built from the VERSIONS file, in order
# to provide information about versions to Jekyll during the site build
Expand Down

0 comments on commit 94b34da

Please sign in to comment.