Skip to content

Commit

Permalink
Makefile: site-offline target.
Browse files Browse the repository at this point in the history
  • Loading branch information
maxim-belkin committed Mar 24, 2021
1 parent ab79109 commit 50df3b9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,17 @@ endif
## I. Commands for both workshop and lesson websites
## =================================================

.PHONY: site docker-serve repo-check clean clean-rmd
.PHONY: site site-offline docker-serve repo-check clean clean-rmd

## * serve : render website and run a local server
serve : lesson-md .vendor/bundle index.md
@bundle exec jekyll serve

## * site : build website but do not run a server
site : lesson-md .vendor/bundle index.md
site : update-bundle site-offline

## * site-offline : same as 'site' but doesn't update Ruby gems
site-offline : lesson-md .vendor/bundle index.md
@bundle exec jekyll build

## * docker-serve : use Docker to serve the site
Expand Down Expand Up @@ -183,6 +186,7 @@ bundle : .vendor/bundle
ifeq (, $(BUNDLE))
$(error Please install Bundler using 'gem install bundler')
else
$(info Installing Ruby gems)
@bundle config set --local path '.vendor/bundle'
@bundle install
@touch .vendor/bundle
Expand All @@ -193,8 +197,9 @@ update-bundle : Gemfile.lock
ifeq (, $(BUNDLE))
$(error Please install Bundler using 'gem install bundler')
else
$(info Updating Ruby gems)
@bundle config set --local path '.vendor/bundle'
@bundle update github-pages
@bundle update --quiet
@touch .vendor/bundle
endif

Expand Down

0 comments on commit 50df3b9

Please sign in to comment.