Skip to content

Commit

Permalink
Move to generating event posts from GitHub issues
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
QuLogic committed Jan 23, 2024
1 parent 7ae851d commit 84f3eca
Show file tree
Hide file tree
Showing 4 changed files with 841 additions and 2 deletions.
23 changes: 21 additions & 2 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ on:

permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
Expand All @@ -23,6 +21,22 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

# Generate event posts by reading them from the UofTCoders/Events issues.
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install pipenv
run: pip install pipenv
- name: Publish events
working-directory: scripts
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pipenv install
pipenv run publish_events
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build with Jekyll
Expand All @@ -34,6 +48,11 @@ jobs:
uses: actions/upload-pages-artifact@v3

deploy:
permissions:
contents: read
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down
19 changes: 19 additions & 0 deletions scripts/Pipfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[[source]]
url = "https://pypi.org/simple"
verify_ssl = true
name = "pypi"

[packages]
pygithub = "*"
dateparser = "*"
python-frontmatter = "*"
cmarkgfm = "*"

[dev-packages]

[requires]
python_version = "3.12"
python_full_version = "3.12.1"

[scripts]
publish_events = "python publish_events.py ../_posts/ failures.yml"
Loading

0 comments on commit 84f3eca

Please sign in to comment.