Skip to content

Commit

Permalink
build: add support for netlify
Browse files Browse the repository at this point in the history
  • Loading branch information
markwoon committed Nov 6, 2024
1 parent 0953819 commit 96a65a1
Show file tree
Hide file tree
Showing 5 changed files with 9,401 additions and 1,111 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -56,3 +56,6 @@ hs_err_pid*

# python directory or files
__pycache__/

# Local Netlify folder
.netlify
9 changes: 4 additions & 5 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ FROM ruby

ENV NODE_MAJOR_VERSION=20

RUN mkdir -p /etc/apt/keyrings
RUN curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg
RUN echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR_VERSION}.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list
RUN mkdir -p /etc/apt/keyrings && \
curl -fsSL https://deb.nodesource.com/gpgkey/nodesource-repo.gpg.key | gpg --dearmor -o /etc/apt/keyrings/nodesource.gpg && \
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_${NODE_MAJOR_VERSION}.x nodistro main" | tee /etc/apt/sources.list.d/nodesource.list

# apt-utils line due to https://github.com/phusion/baseimage-docker/issues/319
RUN apt-get update && \
apt-get install -y --no-install-recommends apt-utils apt-transport-https gnupg && \
apt-get -y upgrade && \
apt-get -y install bzip2 build-essential wget nodejs

RUN npm install --location=global surge
RUN npm install --location=global npm
RUN npm install --location=global npm surge netlify-cli

COPY Makefile Gemfile Gemfile.lock ./
RUN make setup && \
Expand Down
4 changes: 4 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,7 @@ clean:

next: clean build
surge _site next.pharmcat.org

dev:
bundle exec just-the-docs rake search:init
bundle exec jekyll build --incremental
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"@semantic-release/changelog": "6.0.3",
"@semantic-release/git": "10.0.1",
"conventional-changelog-conventionalcommits": "8.0.0",
"semantic-release": "24.1.0",
"netlify-cli": "17.37.2",
"semantic-release": "24.2.0",
"showdown": "2.1.0"
},
"release": {
Expand Down Expand Up @@ -171,6 +172,7 @@
"ci": false
},
"scripts": {
"release": "semantic-release"
"release": "semantic-release",
"localDocs": "netlify deploy --dir=docs/_site --prod"
}
}
Loading

0 comments on commit 96a65a1

Please sign in to comment.