Skip to content

Commit

Permalink
Update buildspec for pelican
Browse files Browse the repository at this point in the history
  • Loading branch information
dltj committed Nov 10, 2024
1 parent 7059258 commit 97f137f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 22 deletions.
4 changes: 3 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
8 changes: 5 additions & 3 deletions buildspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 html
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
32 changes: 16 additions & 16 deletions pdm.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"}

Expand Down

0 comments on commit 97f137f

Please sign in to comment.