Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [main]
pull_request:
branches:
- main
# pull_request:
# branches:
# - main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
Expand Down
9 changes: 6 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ COPY docs/yarn.lock /yarn.lock
RUN yarn --cwd / --modules-folder /app/docs/node_modules install --frozen-lockfile

COPY . /app
COPY action.sh /action.sh
RUN chmod +x /action.sh
COPY scripts/build.sh /build.sh
RUN chmod +x /build.sh

ENTRYPOINT [ "/action.sh" ]
ENV ANGELDOCS_MAIN=/app/src/angel-docs/main.py
ENV STATICSITE_MAIN=/app/docs

ENTRYPOINT [ "/build.sh" ]
21 changes: 0 additions & 21 deletions action.sh

This file was deleted.

46 changes: 46 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
#!/bin/sh -l

# Project Name: AngelDocs
# File Name: build.sh
# Programmer: Kai Prince
# Date: Tue, Apr 13, 2021
# Description: This file contains the build script intended for use by CI.

# ..quit on error
set -e


# The main.py file for the main AngelDocs app.
AngelDocsMain="${ANGELDOCS_MAIN:-src/angel-docs/main.py}"

# The directory containing the 'package.json' file of the static site generator.
StaticSiteMain="${STATICSITE_MAIN:-docs}"

# The output folder for the finished build.
OutputFolder="${FOLDER:-dist}"

# The source files to use.
if [[ -z "$@" ]]; then
SourceFiles="src"
else
SourceFiles="$@"
fi

# Python or Python3
PythonExecutable="${PYTHON_EXECUTABLE:-python}"

SourceFiles="src"


# Run document generator
echo Running AngelDocs on $SourceFiles
echo python version is
$PythonExecutable --version
$PythonExecutable $AngelDocsMain $SourceFiles

# Run static site builder
yarn --cwd $StaticSiteMain build


# Copy site to output folder
cp -f -R $StaticSiteMain/.vitepress/dist $OutputFolder
20 changes: 20 additions & 0 deletions scripts/install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/sh -l


# Project Name: AngelDocs
# File Name: install.sh
# Programmer: Kai Prince
# Date: Tue, Apr 13, 2021
# Description: This file contains the install script intended for use by CI.

# The location of the requirements.txt file
AngelDocs_requirements=src/angel-docs/requirements.txt

# The directory containing the 'package.json' file of the static site generator.
StaticSiteMain="${STATICSITE_MAIN:-docs}"

# Set up python
pip install --no-cache-dir -r $AngelDocs_requirements

# Set up node
yarn --cwd $StaticSiteMain install --frozen-lockfile