Skip to content

Commit

Permalink
#1 making Makefile works in Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
jgeluk committed Feb 3, 2022
1 parent f215c33 commit 0842a29
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .tool-versions
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
python 3.10.2
nodejs 12.17.0
nodejs 17.4.0
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,28 @@ else
INSTALL_TARGET := install-linux
OPEN_EDITORS_VERSION_TARGET := open-editors-version-linux
OPEN_RELEASE_VERSION_TARGET := open-release-version-linux
MKDOCS = $(shell asdf where python)/bin/mkdocs
endif
ifeq ($(YOUR_OS), Darwin)
INSTALL_TARGET := install-macos
OPEN_EDITORS_VERSION_TARGET := open-editors-version-macos
OPEN_RELEASE_VERSION_TARGET := open-release-version-macos
MKDOCS = $(shell asdf where python)/bin/mkdocs
endif
endif
DOC_ORG_NAME := ekgf
DOC_ROOT_NAME := usecase
CURRENT_BRANCH := $(shell git branch --show-current)
MKDOCS = $(shell asdf where python)/bin/mkdocs

.PHONY: info
info:
@echo "MkDocs: ${MKDOCS}"
@echo "Document Version: ${DOC_VERSION}"
@echo "Git Branch: ${CURRENT_BRANCH}"

.PHONY: install
install: docs-install

.PHONY: docs-install
docs-install: docs-install-python-packages
brew upgrade cairo || brew install cairo
Expand All @@ -39,14 +43,18 @@ docs-install: docs-install-python-packages

.PHONY: docs-install-asdf
docs-install-asdf:
ifeq ($(GITHUB_TOKEN),)
brew upgrade asdf || brew install asdf
asdf plugin add python || true
asdf plugin add nodejs || true
endif

.PHONY: docs-install-python
docs-install-python: docs-install-asdf
ifeq ($(GITHUB_TOKEN),)
asdf install
asdf exec python -m pip install --upgrade pip
endif

.PHONY: docs-install-python-packages
docs-install-python-packages: docs-install-python
Expand Down

0 comments on commit 0842a29

Please sign in to comment.