Skip to content
Closed
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
28 changes: 25 additions & 3 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
on: [push]
on:
push:
pull_request_target:
types: [opened, synchronize, reopened]

jobs:
deploy:
Expand All @@ -7,12 +10,15 @@ jobs:
permissions:
contents: read
deployments: write
pull-requests: write

name: Deploy to Cloudflare Pages

steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha || github.sha }}

- name: Setup Ruby
uses: ruby/setup-ruby@v1
Expand All @@ -25,11 +31,27 @@ jobs:
JEKYLL_ENV: production

- name: Publish
id: cloudflare
uses: cloudflare/pages-action@v1.5.0
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: ruby-uy
directory: _site
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
wranglerVersion: '3'
branch: ${{ github.event.pull_request.head.ref || github.ref_name }}

- name: Comment preview URL on PR
if: github.event_name == 'pull_request_target'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `🔍 Preview: ${process.env.DEPLOY_URL}`
})
env:
DEPLOY_URL: ${{ steps.cloudflare.outputs.url }}
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,4 @@ gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]
gem "http_parser.rb", "~> 0.6.0", :platforms => [:jruby]

gem "webrick", "~> 1.8"

5 changes: 4 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@ GEM
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.16.3)
ffi (1.17.4-arm64-darwin)
ffi (1.17.4-x86_64-darwin)
ffi (1.17.4-x86_64-linux-gnu)
forwardable-extended (2.6.0)
google-protobuf (4.26.1-arm64-darwin)
rake (>= 13)
Expand Down Expand Up @@ -83,6 +85,7 @@ GEM
PLATFORMS
arm64-darwin-22
arm64-darwin-23
arm64-darwin-24
x86_64-darwin-21
x86_64-linux

Expand Down
5 changes: 3 additions & 2 deletions _includes/meetups.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ <h1>EDICIONES PASADAS</h1>
<p>Conocé el contenido de las ediciones pasadas.</p>
</header>

{% assign months_es = "ENE,FEB,MAR,ABR,MAY,JUN,JUL,AGO,SEP,OCT,NOV,DIC" | split: ',' %}
{% assign meetups_sorted = site.meetups | sort: "date" | reverse %}

{% assign meetups_by_year = meetups_sorted
Expand All @@ -12,14 +13,14 @@ <h1>EDICIONES PASADAS</h1>
| reverse %}

{% for year in meetups_by_year | reverse %}
<h2 class="meetup-event__date_year">{{ year.name }}</h2>
<h2 class="meetup-event__date_year" id="meetups-{{ year.name }}">{{ year.name }}</h2>

<ul>
{% for meetup in year.items %}
<li class="meetup-event">
<a href="{{ meetup.url }}" class="meetup-event__link">
<span class="meetup-event__date">
{{ meetup.date | date_to_string }}
{% assign m_idx = meetup.date | date: '%m' | minus: 1 %}{{ meetup.date | date: "%d" }} {{ months_es[m_idx] }}
</span>
<span class="meetup-event__company">
{{ meetup.title }}
Expand Down
Loading
Loading