Skip to content

Commit

Permalink
Merge pull request #1 from totaldebug/poetry_support
Browse files Browse the repository at this point in the history
Poetry support
  • Loading branch information
marksie1988 authored Jul 30, 2021
2 parents 8424730 + 8ecb321 commit cdbb304
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 6 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
FROM python:3.9.6-alpine
FROM python:3.9.6-buster

LABEL version="1.0.0"
LABEL repository="https://github.com/totaldebug/sphinx-publish-action"
LABEL homepage="https://github.com/totaldebug/sphinx-publish-action"
LABEL maintainer="Steven Marks <[email protected]>"

# debug
RUN apk add --no-cache git build-base
RUN apk add --update curl
RUN apt update -y
RUN apt upgrade -y
RUN apt install curl git -y

RUN pip install -U sphinx
RUN pip install -U sphinx poetry
RUN sphinx-build --version

COPY LICENSE README.rst /
Expand Down
17 changes: 15 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ if [ "${INPUT_KEEP_HISTORY}" = true ]; then
COMMIT_OPTIONS="--allow-empty"
else
echo "::debug::Initializing new repo"
LOCAL_BRANCH="main"
git init -b $LOCAL_BRANCH
LOCAL_BRANCH="master"
git init
PUSH_OPTIONS="--force"
COMMIT_OPTIONS=""
fi
Expand All @@ -116,6 +116,19 @@ echo "::debug::Local branch is ${LOCAL_BRANCH}"

cd "${GITHUB_WORKSPACE}"

echo "::debug::Checking for requirements file in ${GITHUB_WORKSPACE}/requirements.txt"
if [ -f "${GITHUB_WORKSPACE}/requirements.txt" ]; then
echo "::debug::Installing Project requirements"
pip install -r ${GITHUB_WORKSPACE}/requirements.txt
fi

echo "::debug::Checking for poetry file in ${GITHUB_WORKSPACE}/pyproject.toml"
if [ -f "${GITHUB_WORKSPACE}/pyproject.toml" ]; then
echo "::debug::Installing Poetry Project requirements"
poetry build -f wheel
pip install dist/*.whl
fi

echo "::debug::Checking for requirements file in ${SPHINX_SRC}/requirements.txt"
if [ -f "${SPHINX_SRC}/requirements.txt" ]; then
echo "::debug::Installing Sphinx requirements"
Expand Down

0 comments on commit cdbb304

Please sign in to comment.