Skip to content

Commit

Permalink
Added info on workflows
Browse files Browse the repository at this point in the history
Updates on github-actions
  • Loading branch information
BFT\a.rogalskii committed Jul 1, 2021
1 parent 398c066 commit ec543a2
Show file tree
Hide file tree
Showing 7 changed files with 61 additions and 50 deletions.
6 changes: 5 additions & 1 deletion .env
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
#####################################################
###### General settings
#####################################################
APP_HOSTNAME=java-patterns
APP_HOST_NAME=java-patterns
APP_CONTAINER_NAME=java-patterns
APP_IMAGE_NAME=java-patterns

APP_DATA_DIR=./data
11 changes: 6 additions & 5 deletions .github/workflows/mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ jobs:
steps:
- uses: actions/checkout@v2

- name: Setup Python
- name: Setup Python 3.9
uses: actions/setup-python@v2
with:
python-version: '3.8'
python-version: '3.9'

- name: Upgrade pip
run: |
# install pip=>20.1 to use "pip cache dir"
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade pip --quiet
- name: Get pip cache dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
Expand All @@ -33,9 +33,10 @@ jobs:
${{ runner.os }}-pip-
- name: Install dependencies
run: python3 -m pip install mkdocs mkdocs-material fontawesome_markdown mkdocs-redirects markdown-include
run: python3 -m pip install mkdocs mkdocs-material fontawesome_markdown mkdocs-redirects markdown-include --quiet

- run: mkdocs build
- name: Run mkdocs
run: mkdocs build --verbose

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# [0.0.0](https://github.com/AlexRogalskiy/java-patterns/compare/v1.0.1...v0.0.0) (2021-06-23)
# [0.0.0](https://github.com/AlexRogalskiy/java-patterns/compare/v1.0.1...v0.0.0) (2021-07-01)



Expand Down
23 changes: 13 additions & 10 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,20 @@ FROM ${IMAGE_SOURCE}:${IMAGE_TAG}

## Setting argument variables
ARG PYTHON_VERSION=3.8.2

ARG LC_ALL="en_US.UTF-8"

ARG NAME="java-patterns"
ARG VERSION="0.0.0-dev"

ARG BUILD_DATE="$(git rev-parse --short HEAD)"
ARG VCS_REF="$(date -u +\"%Y-%m-%dT%H:%M:%SZ\")"

ARG APP_DIR="/usr/src/app"
ARG DATA_DIR="/usr/src/data"

## Setting metadata labels
LABEL "name"="java-patterns"
LABEL "name"="$NAME"
LABEL "version"="$VERSION"

LABEL "com.github.repository"="https://github.com/AlexRogalskiy/java-patterns"
Expand All @@ -27,7 +31,7 @@ LABEL "com.github.version"="$VERSION"
LABEL "com.github.build-date"="$BUILD_DATE"
LABEL "com.github.vcs-ref"="$VCS_REF"

LABEL "com.github.name"="java-patterns"
LABEL "com.github.name"="$NAME"
LABEL "com.github.description"="Java Design Patterns"

## Setting environment variables
Expand All @@ -52,17 +56,16 @@ RUN cd /tmp && curl -O https://www.python.org/ftp/python/${PYTHON_VERSION}/Pytho
make altinstall

RUN apt update
RUN pip3.8 install --upgrade pip --quiet

RUN pip3.8 install --upgrade pip

RUN pip3.8 install mkdocs --no-cache-dir
RUN pip3.8 install mkdocs-material --no-cache-dir
RUN pip3.8 install markdown-include --no-cache-dir
RUN pip3.8 install mkdocs-techdocs-core --no-cache-dir
RUN pip3.8 install click-man --no-cache-dir
RUN pip3.8 install mkdocs --no-cache-dir --quiet
RUN pip3.8 install mkdocs-material --no-cache-dir --quiet
RUN pip3.8 install markdown-include --no-cache-dir --quiet
RUN pip3.8 install mkdocs-techdocs-core --no-cache-dir --quiet
RUN pip3.8 install click-man --no-cache-dir --quiet
## click-man --target path/to/man/pages mkdocs

RUN pip3.8 install cookiecutter --no-cache-dir && \
RUN pip3.8 install cookiecutter --no-cache-dir --quiet && \
apt remove -y build-essential zlib1g-dev libncurses5-dev libgdbm-dev libnss3-dev libssl-dev libsqlite3-dev libreadline-dev libffi-dev libbz2-dev g++ python-pip python-dev && \
rm -rf /var/cache/apt/* /tmp/Python-${PYTHON_VERSION}

Expand Down
56 changes: 29 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,35 @@
## 🎹 *Table of contents*

<!--ts-->
* [Java Design Patterns](#java-design-patterns)
* [<em>Table of contents</em>](#-table-of-contents)
* [<em>Summary</em>](#-summary)
* [<em>Documentation</em>](#-documentation)
* [<em>Statistics</em>](#-statistics)
* [<em>Versioning</em>](#-versioning)
* [<em>Authors</em>](#-authors)
* [<em>Contributing</em>](#-contributing)
* [<em>Visitor stats</em>](#-visitor-stats)
* [<em>Licensing</em>](#-licensing)
* [<em>Development Support</em>](#-development-support)
* [<em>Acknowledgement</em>](#-acknowledgement)
* [<em>OpenGraph Card</em>](#-opengraph-card)
* [<em>Feeds and Podcasts</em>](#-feeds-and-podcasts)
* [<em>Reddit posts</em>](#reddit-posts)
* [<em>InfoWorld posts</em>](#infoworld-posts)
* [<em>Let's talk posts</em>](#lets-talk-posts)
* [<em>Random thoughts posts</em>](#random-thoughts-posts)
* [<em>Better code posts</em>](#better-code-posts)
* [<em>Inside Java posts</em>](#inside-java-posts)
* [<em>Java programmer posts</em>](#java-programmer-posts)
* [<em>Dreamix posts</em>](#dreamix-posts)
* [<em>Plumbr posts</em>](#plumbr-posts)
* [<em>Thorben Janssen posts</em>](#thorben-janssen-posts)
* [<em>Redhat posts</em>](#redhat-posts)
* [<em>JavaCodeGeeks posts</em>](#javacodegeeks-posts)
* [<em>DevCases posts</em>](#devcases-posts)

- [Java Design Patterns](#java-design-patterns)
- [<em>Table of contents</em>](#-table-of-contents)
- [<em>Summary</em>](#-summary)
- [<em>Documentation</em>](#-documentation)
- [<em>Statistics</em>](#-statistics)
- [<em>Versioning</em>](#-versioning)
- [<em>Authors</em>](#-authors)
- [<em>Contributing</em>](#-contributing)
- [<em>Visitor stats</em>](#-visitor-stats)
- [<em>Licensing</em>](#-licensing)
- [<em>Development Support</em>](#-development-support)
- [<em>Acknowledgement</em>](#-acknowledgement)
- [<em>OpenGraph Card</em>](#-opengraph-card)
- [<em>Feeds and Podcasts</em>](#-feeds-and-podcasts)
- [<em>Reddit posts</em>](#reddit-posts)
- [<em>InfoWorld posts</em>](#infoworld-posts)
- [<em>Let's talk posts</em>](#lets-talk-posts)
- [<em>Random thoughts posts</em>](#random-thoughts-posts)
- [<em>Better code posts</em>](#better-code-posts)
- [<em>Inside Java posts</em>](#inside-java-posts)
- [<em>Java programmer posts</em>](#java-programmer-posts)
- [<em>Dreamix posts</em>](#dreamix-posts)
- [<em>Plumbr posts</em>](#plumbr-posts)
- [<em>Thorben Janssen posts</em>](#thorben-janssen-posts)
- [<em>Redhat posts</em>](#redhat-posts)
- [<em>JavaCodeGeeks posts</em>](#javacodegeeks-posts)
- [<em>DevCases posts</em>](#devcases-posts)

<!--te-->

## *Summary*
Expand Down
7 changes: 4 additions & 3 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ version: '3.9'

services:
app:
container_name: java-patterns
hostname: '$APP_HOSTNAME'
container_name: ${APP_CONTAINER_NAME:-'java-patterns'}
image: ${APP_IMAGE_NAME:-'java-patterns'}
hostname: ${APP_HOST_NAME:-'java-patterns'}
build:
context: './'
dockerfile: Dockerfile
Expand All @@ -15,7 +16,7 @@ services:
volume:
nocopy: true
- type: bind
source: ./data
source: ${APP_DATA_DIR:-./data}
target: /usr/src/data
healthcheck:
test: ['CMD-SHELL', 'nc', '-vz', 'localhost', '8000']
Expand Down
6 changes: 3 additions & 3 deletions scripts/build-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ wget --no-check-certificate https://bootstrap.pypa.io/get-pip.py -O $TMPDIR/get-
python $TMPDIR/get-pip.py

## Install project dependencies
python -m pip install mkdocs
python -m pip install mkdocs-material
python -m pip install markdown-include
python -m pip install mkdocs --quiet
python -m pip install mkdocs-material --quiet
python -m pip install markdown-include --quiet

## Start server locally
python -m mkdocs serve --verbose --dirtyreload

0 comments on commit ec543a2

Please sign in to comment.