Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A pile of tweaks #77

Merged
merged 11 commits into from
Nov 4, 2023
Merged
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
23 changes: 16 additions & 7 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,14 @@ jobs:
role-session-name: deploy-ideas
mask-aws-account-id: false

- name: Set up Python 3
uses: actions/setup-python@v2
- name: Set up Python & PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: "3.11"
cache: true

- name: install python libs
run: pdm install

- name: Set up Node
uses: actions/setup-node@v2
Expand All @@ -40,27 +44,32 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip pip-tools
pip-sync requirements.txt
npm install
echo "$GITHUB_WORKSPACE/node_modules/.bin" >> $GITHUB_PATH

- name: Assert that our dependencies are reachable
run: |
eval $(pdm venv activate)
echo $PATH
python --version
pelican --version
sass --version
just --version

- name: Build the page
run: just build
run: |
eval $(pdm venv activate)
just generate

- name: Publish the content
run: just upload
run: |
eval $(pdm venv activate)
just upload

- name: Invalidate the existing distribution
run: just invalidate
run: |
eval $(pdm venv activate)
just invalidate

- name: Tell me about it
if: ${{ always() }}
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,14 @@ jobs:
- uses: actions/checkout@v2
- uses: extractions/setup-just@v1

- name: Set up Python 3
uses: actions/setup-python@v2
- name: Set up Python & PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: "3.11"
cache: true

- name: install python libs
run: pdm install

- name: Set up Node
uses: actions/setup-node@v2
Expand All @@ -30,13 +34,13 @@ jobs:

- name: Install dependencies
run: |
python -m pip install --upgrade pip pip-tools
pip-sync requirements.txt
npm install
echo "$GITHUB_WORKSPACE/node_modules/.bin" >> $GITHUB_PATH

- name: Clone plugins
run: git clone https://github.com/getpelican/pelican-plugins

- name: Build the page
run: just build
run: |
eval $(pdm venv activate)
just generate
8 changes: 5 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,12 @@ repos:
- id: check-hooks-apply
- id: check-useless-excludes

- repo: https://github.com/psf/black
rev: 23.9.1
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.0
hooks:
- id: black
- id: ruff
- id: ruff-format
args: ["--check"]

- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.83.2
Expand Down
84 changes: 0 additions & 84 deletions fabfile.py

This file was deleted.

6 changes: 2 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,12 @@ prepare_fonts:
node_modules/@fortawesome/fontawesome-free/webfonts/ \
themes/offby1/static/webfonts/

@build settings="pelicanconf.py": prepare_fonts
pelican -s {{settings}} -o output content
build settings="pelicanconf.py": prepare_fonts
pelican --fatal=errors -s {{settings}} -o output content

generate: (build "publishconf.py")
pelican content -o output -s publishconf.py

generate-dev: build
pelican content -o output -s pelicanconf.py

publish: generate upload invalidate

Expand Down
Loading
Loading