Skip to content

Commit be8a98c

Browse files
committed
Move to generating event posts from GitHub issues
This looks up issues from the UofTCoders/Events repo, within the "Publishable" milestone, and then translates them into Jekyll posts so that they can appear on the website automatically.
1 parent 7ae851d commit be8a98c

File tree

4 files changed

+842
-2
lines changed

4 files changed

+842
-2
lines changed

.github/workflows/jekyll-gh-pages.yml

+21-2
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ on:
88

99
permissions:
1010
contents: read
11-
pages: write
12-
id-token: write
1311

1412
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1513
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
@@ -23,6 +21,22 @@ jobs:
2321
steps:
2422
- name: Checkout
2523
uses: actions/checkout@v4
24+
25+
# Generate event posts by reading them from the UofTCoders/Events issues.
26+
- name: Set up Python
27+
uses: actions/setup-python@v5
28+
with:
29+
python-version: 3.12
30+
- name: Install pipenv
31+
run: pip install pipenv
32+
- name: Publish events
33+
working-directory: scripts
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
36+
run: |
37+
pipenv install
38+
pipenv run publish_events
39+
2640
- name: Setup Pages
2741
uses: actions/configure-pages@v4
2842
- name: Build with Jekyll
@@ -34,6 +48,11 @@ jobs:
3448
uses: actions/upload-pages-artifact@v3
3549

3650
deploy:
51+
permissions:
52+
contents: read
53+
pages: write
54+
id-token: write
55+
3756
environment:
3857
name: github-pages
3958
url: ${{ steps.deployment.outputs.page_url }}

scripts/Pipfile

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[[source]]
2+
url = "https://pypi.org/simple"
3+
verify_ssl = true
4+
name = "pypi"
5+
6+
[packages]
7+
pygithub = "*"
8+
dateparser = "*"
9+
python-frontmatter = "*"
10+
cmarkgfm = "*"
11+
12+
[dev-packages]
13+
14+
[requires]
15+
python_version = "3.12"
16+
python_full_version = "3.12.1"
17+
18+
[scripts]
19+
publish_events = "python publish_events.py ../_posts/ failures.yml"

0 commit comments

Comments
 (0)