Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/origin/main'
Browse files Browse the repository at this point in the history
  • Loading branch information
hepplerj committed May 21, 2024
2 parents 95289b6 + 7a41526 commit b5d8e25
Show file tree
Hide file tree
Showing 5 changed files with 44 additions and 17 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/cicd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: "[relec-website] Build, Release, Deploy"

on:
workflow_dispatch:
push:
branches:
- "main"
- "preview"

jobs:
hugo-build-release-deploy:
uses: chnm/.github/.github/workflows/hugo--build-release-deploy.yml@main
secrets: inherit
with:
container-registry: "ghcr.io"
container-image-name: "relec-website"
hugo-context-root: "."
hugo-devl-url: "http://dev.religiousecologies.org"
hugo-prod-url: "https://religiousecologies.org"

build-artifact-name: "relec-website"
release-tag-name-type: "iso"

website-devl-fqdn: "dev.religiousecologies.org"
website-prod-fqdn: "religiousecologies.org"
17 changes: 17 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
FROM klakegg/hugo:0.107.0-ext-alpine as build-stage

ARG hugobuildargs
ENV HUGO_BUILD_ARGS $hugobuildargs

RUN apk add npm

WORKDIR /app
ADD . .

RUN npm install -y
RUN hugo ${HUGO_BUILD_ARGS}

FROM nginx:1.23-alpine

COPY --from=build-stage /app/public/ /usr/share/nginx/html

14 changes: 0 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,23 +7,9 @@ build :
hugo --cleanDestinationDir --buildDrafts --buildFuture --baseURL https://dev.religiousecologies.org/
@echo "Website finished building."

deploy : build
@echo "\nDeploying the site to dev with rsync ..."
rsync --delete --itemize-changes --omit-dir-times \
--checksum -avz --no-t --no-perms --exclude-from=rsync-excludes \
public/ athena:/websites/relecodev/www/ | egrep -v '^\.'
@echo "Finished deploying the site to dev with rsync."

build-prod :
@echo "\nBuilding the site with Hugo ..."
hugo --cleanDestinationDir --minify
@echo "Website finished building."

deploy-prod : build-prod
@echo "\nDeploying the site to production with rsync ..."
rsync --delete --itemize-changes --omit-dir-times \
--checksum -avz --no-t --no-perms --exclude-from=rsync-excludes \
public/ athena:/websites/religiousecologies.org/ | egrep -v '^\.'
@echo "Finished deploying the site to production with rsync."

.PHONY : preview build deploy
2 changes: 2 additions & 0 deletions config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ markup:
goldmark:
renderer:
unsafe: true

timeout: "120s"
3 changes: 0 additions & 3 deletions rsync-excludes

This file was deleted.

0 comments on commit b5d8e25

Please sign in to comment.