Skip to content

Commit

Permalink
Merge pull request #527 from QuLogic/auto-event
Browse files Browse the repository at this point in the history
Generate event posts from GitHub issues
  • Loading branch information
vickimzhang committed Jan 23, 2024
2 parents 5da2d74 + 0f3e216 commit 97feb2c
Show file tree
Hide file tree
Showing 5 changed files with 864 additions and 7 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
15 changes: 10 additions & 5 deletions _includes/events.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@
<div class="col-lg-12 text-center">
<h2 class="section-heading">Events</h2>
<h3 class="section-subheading text-muted">

Unless otherwise stated, <b> all our events are open to everyone </b> (i.e. no registration necessary, just show up!) and are held in MADLab at
<a href="https://www.google.ca/maps/place/Gerstein+Science+Information+Centre/@43.662195,-79.3961537,17z/data=!3m1!4b1!4m5!3m4!1s0x882b34b854ad5761:0xd4cee6c2ece27846!8m2!3d43.662195!4d-79.393965?dcr=0">
Gerstein Science Information Centre</a>, which is room B112 at the south end of the first lower level.
Go through the main entrance of Gerstein, take a right turn down a corridor (across from the admin desk or just past the reading room), then take the stairs down and follow the signs to MADLab, the door should be open 10-15 minutes before each session.
Unless otherwise stated, <b> all our events are open to everyone </b>
(i.e. no registration necessary, just show up!) and are held in
CDRS (Collaborative Digital Research Space, MN 3230) at the
<a href="https://maps.app.goo.gl/TXY3fA2w1ub3SwYQ6">Maanjiwe
Nendamowinan building</a>.
The CDRS is at the north end of the third level. Once you go
through the main entrance of MN, take the elevator to the third
floor, turn left, and go all the way down the hall. The door
should be open 10-15 minutes before the lesson.

A list of all previous events and sessions can be found on the <a href="{{ site.github.url | replace:'http:','https:' }}/past-events/">"Past Events" page</a>.
</h3>
</div>
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 97feb2c

Please sign in to comment.