Skip to content

Commit 90ce692

Browse files
Initialise site (#1)
Co-authored-by: Lee Jordan <ldjordan@gmail.com>
1 parent bca03fb commit 90ce692

24 files changed

+856
-0
lines changed

.github/dependabot.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: pip
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
8+
- package-ecosystem: "github-actions"
9+
directory: "/"
10+
schedule:
11+
interval: "monthly"

.github/workflows/auto-merge.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Dependabot auto-merge
2+
on: pull_request_target
3+
4+
permissions:
5+
pull-requests: write
6+
contents: write
7+
8+
jobs:
9+
dependabot:
10+
runs-on: ubuntu-latest
11+
if: ${{ github.actor == 'dependabot[bot]' }}
12+
steps:
13+
- name: Dependabot metadata
14+
id: metadata
15+
uses: dependabot/fetch-metadata@v2
16+
with:
17+
github-token: "${{ secrets.GITHUB_TOKEN }}"
18+
- name: Enable auto-merge for Dependabot PRs
19+
run: gh pr merge --auto --squash "$PR_URL"
20+
env:
21+
PR_URL: ${{github.event.pull_request.html_url}}
22+
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/ci-cd.yml

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
name: CI
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches: ["master"]
7+
8+
permissions: {}
9+
10+
jobs:
11+
build:
12+
permissions:
13+
contents: read
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
- name: Setup Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: 3.14
22+
cache: 'pip'
23+
cache-dependency-path: '**/requirements*.txt'
24+
- name: Install dependencies
25+
uses: py-actions/py-dependency-install@v4
26+
with:
27+
path: requirements.txt
28+
- name: Build site
29+
run: pelican -s publishconf.py
30+
- name: Build Pygments CSS
31+
run: pygmentize -S default -f html > output/theme/css/pygment.css
32+
- name: Run tests
33+
run: python test.py
34+
- name: Setup Pages
35+
uses: actions/configure-pages@v5
36+
- name: Upload artifact
37+
uses: actions/upload-pages-artifact@v3
38+
with:
39+
path: 'output/'
40+
41+
deploy_preview:
42+
if: "github.event_name == 'pull_request'"
43+
runs-on: "ubuntu-latest"
44+
needs: "build"
45+
permissions:
46+
pull-requests: write # For comments in PRs
47+
steps:
48+
- name: Download site artifact
49+
uses: actions/download-artifact@v4
50+
with:
51+
# The name of artifacts created by `actions/upload-pages-artifact` is always "github-pages"
52+
name: github-pages
53+
path: 'output/'
54+
- name: Untar site artifact
55+
run: tar --directory output/ -xvf output/artifact.tar
56+
- name: Deploy preview to Netlify
57+
uses: nwtgck/actions-netlify@v2
58+
env:
59+
NETLIFY_SITE_ID: "${{ secrets.NETLIFY_SITE_ID }}"
60+
NETLIFY_AUTH_TOKEN: "${{ secrets.NETLIFY_AUTH_TOKEN }}"
61+
with:
62+
publish-dir: 'output/'
63+
timeout-minutes: 1
64+
65+
deploy:
66+
if: "github.event_name == 'push'"
67+
runs-on: "ubuntu-latest"
68+
needs: "build"
69+
permissions:
70+
id-token: write # to verify the deployment originates from an appropriate source
71+
pages: write
72+
concurrency:
73+
group: "pages"
74+
cancel-in-progress: false
75+
environment:
76+
name: github-pages
77+
url: ${{ steps.deployment.outputs.page_url }}
78+
steps:
79+
- name: Deploy to GitHub Pages
80+
id: deployment
81+
uses: actions/deploy-pages@v4

Makefile

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
PY?=
2+
PELICAN?=pelican
3+
PELICANOPTS=
4+
5+
BASEDIR=$(CURDIR)
6+
INPUTDIR=$(BASEDIR)/content
7+
OUTPUTDIR=$(BASEDIR)/output
8+
CONFFILE=$(BASEDIR)/pelicanconf.py
9+
PUBLISHCONF=$(BASEDIR)/publishconf.py
10+
11+
GITHUB_PAGES_BRANCH=gh-pages
12+
GITHUB_PAGES_COMMIT_MESSAGE=Generate Pelican site
13+
14+
15+
DEBUG ?= 0
16+
ifeq ($(DEBUG), 1)
17+
PELICANOPTS += -D
18+
endif
19+
20+
RELATIVE ?= 0
21+
ifeq ($(RELATIVE), 1)
22+
PELICANOPTS += --relative-urls
23+
endif
24+
25+
SERVER ?= "0.0.0.0"
26+
27+
PORT ?= 0
28+
ifneq ($(PORT), 0)
29+
PELICANOPTS += -p $(PORT)
30+
endif
31+
32+
33+
help:
34+
@echo 'Makefile for a pelican Web site '
35+
@echo ' '
36+
@echo 'Usage: '
37+
@echo ' make html (re)generate the web site '
38+
@echo ' make clean remove the generated files '
39+
@echo ' make regenerate regenerate files upon modification '
40+
@echo ' make publish generate using production settings '
41+
@echo ' make serve [PORT=8000] serve site at http://localhost:8000'
42+
@echo ' make serve-global [SERVER=0.0.0.0] serve (as root) to $(SERVER):80 '
43+
@echo ' make devserver [PORT=8000] serve and regenerate together '
44+
@echo ' make devserver-global regenerate and serve on 0.0.0.0 '
45+
@echo ' '
46+
@echo 'Set the DEBUG variable to 1 to enable debugging, e.g. make DEBUG=1 html '
47+
@echo 'Set the RELATIVE variable to 1 to enable relative urls '
48+
@echo ' '
49+
50+
html:
51+
"$(PELICAN)" "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS)
52+
53+
clean:
54+
[ ! -d "$(OUTPUTDIR)" ] || rm -rf "$(OUTPUTDIR)"
55+
56+
regenerate:
57+
"$(PELICAN)" -r "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS)
58+
59+
serve:
60+
"$(PELICAN)" -l "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS)
61+
62+
serve-global:
63+
"$(PELICAN)" -l "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS) -b $(SERVER)
64+
65+
devserver:
66+
"$(PELICAN)" -lr "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS)
67+
68+
devserver-global:
69+
"$(PELICAN)" -lr "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(CONFFILE)" $(PELICANOPTS) -b 0.0.0.0
70+
71+
publish:
72+
"$(PELICAN)" "$(INPUTDIR)" -o "$(OUTPUTDIR)" -s "$(PUBLISHCONF)" $(PELICANOPTS)
73+
74+
75+
.PHONY: html help clean regenerate serve serve-global devserver devserver-global publish

content/images/aio-libs.svg

Lines changed: 1 addition & 0 deletions
Loading
Lines changed: 22 additions & 0 deletions
Loading
Lines changed: 3 additions & 0 deletions
Loading
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Title: Welcome to the aio-libs site
2+
3+
We've just launched the new home page for aio-libs.
4+
5+
This is where we'll share updates and behind-the-scene looks at the work we've been doing across our projects.
6+
7+
You can subscribe to the [Atom feed](https://aio-libs.org/feeds/atom.xml) to get the latest updates as we post them.
8+
The [aio-libs](https://aio-libs.org/feeds/aio-libs.atom.xml) tag will be used to discuss general updates around the
9+
group and introduce new projects. More tags will be added later to cover other areas.

0 commit comments

Comments
 (0)