From aebe834111b12ee4cbf8dd3cbba663828d4ff1ee Mon Sep 17 00:00:00 2001 From: Peter Murray Date: Sun, 10 Nov 2024 16:52:45 -0500 Subject: [PATCH] Update buildspec for pelican --- Dockerfile | 4 +++- buildspec.yml | 8 +++++--- pdm.lock | 32 ++++++++++++++++---------------- pyproject.toml | 4 ++-- 4 files changed, 26 insertions(+), 22 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9cd88da6..c02aff04 100644 --- a/Dockerfile +++ b/Dockerfile @@ -11,6 +11,8 @@ WORKDIR /app RUN apt-get update && apt-get install -y \ git \ curl \ + jq \ + awscli \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ # Install PDM @@ -26,7 +28,7 @@ RUN set -eux; \ rm /tmp/s3deploy.tar.gz # Copy the pyproject.toml and pdm.lock files -COPY pyproject.toml pdm.lock* util /app/ +COPY pyproject.toml pdm.lock* /app/ # Install the dependencies RUN pdm install --prod --no-self diff --git a/buildspec.yml b/buildspec.yml index 7787ec7f..4768582f 100644 --- a/buildspec.yml +++ b/buildspec.yml @@ -21,11 +21,13 @@ phases: - export LANGUAGE="en_US.UTF-8" build: commands: - - bundler exec jekyll build --trace + - ls -la + - pdm install --prod + - pdm run pelican content -o output -s publishconf.py -t /app/pelican-themes/pelican-hyde post_build: commands: - aws s3 cp webmentions-cache s3://org.dltj.webmentions-cache --recursive - - cp ./assets/js/JekyllWebmentionIO.js _site/assets/js/JekyllWebmentionIO.js + - cp ./assets/js/JekyllWebmentionIO.js output/assets/js/JekyllWebmentionIO.js # - aws s3 sync --delete --size-only --cache-control max-age=7201 _site/ "s3://${BUCKET_NAME}" - - s3deploy -bucket org.dltj.blog -region us-east-1 -source _site/ -distribution-id ${DISTRIBUTION_ID} -key $AWS_ACCESS_KEY_ID -secret $AWS_SECRET_ACCESS_KEY + - s3deploy -bucket org.dltj.blog -region us-east-1 -source output/ -distribution-id ${DISTRIBUTION_ID} -key $AWS_ACCESS_KEY_ID -secret $AWS_SECRET_ACCESS_KEY - aws s3api put-bucket-website --bucket "${BUCKET_NAME}" --website-configuration file://s3-website-config.json diff --git a/pdm.lock b/pdm.lock index 76203fff..607c1c6d 100644 --- a/pdm.lock +++ b/pdm.lock @@ -5,10 +5,10 @@ groups = ["default", "dev"] strategy = ["inherit_metadata"] lock_version = "4.5.0" -content_hash = "sha256:b6643b02879e7991ad25d2d363a11165fb631a622f43ad5431965bf7745f9d40" +content_hash = "sha256:aeeb193cf5e09341c598d74faf63573164ef1cc05bf57b208a83bf075da4754f" [[metadata.targets]] -requires_python = "==3.12.*" +requires_python = "==3.12.7" [[package]] name = "anyio" @@ -38,6 +38,18 @@ files = [ {file = "blinker-1.8.2.tar.gz", hash = "sha256:8f77b09d3bf7c795e969e9486f39c2c5e9c39d4ee07424be2bc594ece9642d83"}, ] +[[package]] +name = "dltj-plugin" +version = "1.0.0" +requires_python = ">=3.8.1,<4.0" +git = "https://github.com/dltj/pelican-dltj-plugin.git" +revision = "f33d3ea2ca2c3422a5d95da868a1d7042e17456c" +summary = "Stuff specific to the DLTJ blog" +groups = ["default"] +dependencies = [ + "pelican>=4.5", +] + [[package]] name = "docutils" version = "0.21.2" @@ -188,7 +200,7 @@ name = "pelican" version = "4.10.1" requires_python = ">=3.8.1,<4.0" git = "https://github.com/dltj/pelican.git" -revision = "882cd16e114cac40f0bc39e0b317981939b598d7" +revision = "73115fb6f9beeb9c0e96c90f1efce9739fb5cd6a" summary = "Static site generator supporting Markdown and reStructuredText" groups = ["default"] dependencies = [ @@ -206,18 +218,6 @@ dependencies = [ "watchfiles>=0.21.0", ] -[[package]] -name = "pelican-dltj-plugin" -version = "1.0.0" -requires_python = ">=3.8.1,<4.0" -git = "https://github.com/dltj/pelican-dltj-plugin.git" -revision = "f33d3ea2ca2c3422a5d95da868a1d7042e17456c" -summary = "Stuff specific to the DLTJ blog" -groups = ["default"] -dependencies = [ - "pelican>=4.5", -] - [[package]] name = "pelican-jinja2content" version = "1.0.1" @@ -250,7 +250,7 @@ version = "4.10.1" extras = ["markdown"] requires_python = ">=3.8.1,<4.0" git = "https://github.com/dltj/pelican.git" -revision = "882cd16e114cac40f0bc39e0b317981939b598d7" +revision = "73115fb6f9beeb9c0e96c90f1efce9739fb5cd6a" summary = "Static site generator supporting Markdown and reStructuredText" groups = ["default"] dependencies = [ diff --git a/pyproject.toml b/pyproject.toml index ffd17c01..378c7e63 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,10 +9,10 @@ dependencies = [ "pelican[markdown] @ git+https://github.com/dltj/pelican.git", "pelican-jinja2content @ git+https://github.com/pelican-plugins/jinja2content.git", "pelican-yaml-metadata @ git+https://github.com/pelican-plugins/yaml-metadata.git", - "pelican-dltj-plugin @ git+https://github.com/dltj/pelican-dltj-plugin.git", "zygote-reader @ git+https://github.com/dltj/zygote-reader", + "dltj-plugin @ git+https://github.com/dltj/pelican-dltj-plugin.git", ] -requires-python = "==3.12.*" +requires-python = "==3.12.7" readme = "README.md" license = {text = "MIT"}