Skip to content

Commit

Permalink
πŸ‘©πŸ»β€πŸŽ¨ Add the myst-theme repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanc1 committed Apr 28, 2023
1 parent 41ac522 commit 29f3cf7
Show file tree
Hide file tree
Showing 70 changed files with 91,199 additions and 38 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ node_modules
.pnp
.pnp.js
.ipynb_checkpoints
.deploy

# testing
coverage
Expand Down
6 changes: 0 additions & 6 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
[submodule "themes/book-theme"]
path = themes/book-theme
url = https://github.com/executablebooks/myst-book-theme
[submodule "themes/article-theme"]
path = themes/article-theme
url = https://github.com/executablebooks/myst-article-theme
[submodule "patches"]
path = patches
url = https://github.com/executablebooks/myst-theme-patches
37 changes: 37 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
.PHONY: build-theme build-article build-book deploy-theme deploy-article deploy-book

COMMIT = $(shell git rev-parse --short HEAD)

THEME=article

build-theme:
mkdir .deploy || true
rm -rf .deploy/$(THEME)
git clone https://github.com/myst-templates/$(THEME)-theme .deploy/$(THEME)
rm -rf .deploy/$(THEME)/public .deploy/$(THEME)/build .deploy/$(THEME)/package.json .deploy/$(THEME)/package-lock.json .deploy/$(THEME)/template.yml .deploy/$(THEME)/server.js
find template -type f -exec cp {} .deploy/$(THEME) \;
cd themes/$(THEME) && npm run prod:build
cp -r themes/$(THEME)/public .deploy/$(THEME)/public
cp -r themes/$(THEME)/build .deploy/$(THEME)/build
cp -r themes/$(THEME)/template.yml .deploy/$(THEME)/template.yml
sed -i.bak "s/template/$(THEME)/g" .deploy/$(THEME)/package.json
rm .deploy/$(THEME)/package.json.bak
cd .deploy/$(THEME) && npm install

build-article:
make THEME=article build-theme

build-book:
make THEME=book build-theme

deploy-theme:
make THEME=$(THEME) build-theme
cd .deploy/$(THEME) && git add .
cd .deploy/$(THEME) && git commit -m "Release $(COMMIT)"
cd .deploy/$(THEME) && git push -u origin main

deploy-article:
make THEME=article deploy-theme

deploy-book:
make THEME=book deploy-theme
Loading

0 comments on commit 29f3cf7

Please sign in to comment.