Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Build and Deploy to Netlify
on:
push:
branches:
- main
- cason/docs-symlink
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This MUST be reverted when merging.

workflow_dispatch:
schedule:
- cron: "0 0 * * *"
Expand Down 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/actions-netlify@v2.0.0
Expand Down
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,15 @@ build:
@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 \
[ -L _site/$${output_path}/docs ] || ln -vs . _site/$${output_path}/docs ; \
done < VERSIONS
@if [ "${LOCAL_DOCS_REPO}" ]; then \
[ -L_site/dev/docs ] || ln -vs . _site/dev/docs ; \
fi

# Creates _data/versions.yml, which is built from the VERSIONS file, in order
# to provide information about versions to Jekyll during the site build
# process. This assists in constructing the dropdown version selector menu.
Expand Down