Skip to content

Commit 59e7346

Browse files
committed
Update the workflows
1 parent 83a30f3 commit 59e7346

File tree

2 files changed

+126
-28
lines changed

2 files changed

+126
-28
lines changed

.github/workflows/github-pages.yml

Lines changed: 48 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,56 @@ on:
55
push:
66
branches:
77
- dev
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
820

921
jobs:
10-
github-pages:
22+
build:
1123
runs-on: ubuntu-latest
24+
1225
steps:
13-
- uses: actions/checkout@v2
14-
- uses: helaili/jekyll-action@v2
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
29+
- name: Setup Ruby
30+
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
1531
with:
16-
token: ${{ secrets.GITHUB_TOKEN }}
32+
ruby-version: '3.1' # Not needed with a .ruby-version file
33+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
34+
cache-version: 0 # Increment this number if you need to re-download cached gems
35+
36+
- name: Setup Pages
37+
id: pages
38+
uses: actions/configure-pages@v3
39+
40+
- name: Build with Jekyll
41+
# Outputs to the './_site' directory by default
42+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
43+
env:
44+
JEKYLL_ENV: production
45+
46+
- name: Upload artifact
47+
# Automatically uploads an artifact from the './_site' directory by default
48+
uses: actions/upload-pages-artifact@v2
49+
50+
deploy:
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
runs-on: ubuntu-latest
55+
needs: build
56+
57+
steps:
58+
- name: Deploy to GitHub Pages
59+
id: deployment
60+
uses: actions/deploy-pages@v2

.github/workflows/jam-post.yml

Lines changed: 78 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
name: Create Game Jam Post
22

3-
on:
3+
on:
44
workflow_dispatch:
55
inputs:
66
month-and-year:
7-
description: "The month & year the jam is taking place in"
7+
description: "The month & year the jam is taking place in"
88
required: true
99
default: 'December 2023'
1010
number:
11-
description: "The ordinal number of the jam"
11+
description: "The ordinal number of the jam"
1212
required: true
1313
default: '27th'
1414
video-id:
15-
description: "The jam trailer's YouTube video ID"
15+
description: "The jam trailer's YouTube video ID"
1616
required: true
1717
default: 'NE6vIKRfeDo'
1818
itchio-link:
19-
description: "The itch.io link of the jam"
19+
description: "The itch.io link of the jam"
2020
required: true
2121
default: 'https://itch.io/jam/libgdx-jam-27'
2222
date1:
23-
description: "Theme submission start"
23+
description: "Theme submission start"
2424
required: true
2525
default: '3rd'
2626
date2:
27-
description: "Theme submission end"
27+
description: "Theme submission end"
2828
required: true
2929
default: '5th of December'
3030
date3:
31-
description: "Theme voting start"
31+
description: "Theme voting start"
3232
required: true
3333
default: '7th'
3434
date4:
35-
description: "Theme voting end"
35+
description: "Theme voting end"
3636
required: true
3737
default: '9th of December'
3838
date5:
39-
description: "Jam start"
39+
description: "Jam start"
4040
required: true
4141
default: '10th'
4242
date6:
43-
description: "Jam end"
43+
description: "Jam end"
4444
required: true
4545
default: '16th of December'
4646

@@ -50,13 +50,13 @@ jobs:
5050

5151
permissions:
5252
contents: write
53-
53+
5454
steps:
55-
- uses: actions/checkout@v4.1.1
56-
55+
- uses: actions/checkout@v4
56+
5757
- name: Retrieve post year
5858
run: echo "YEAR=$(date +'%Y')" >> $GITHUB_ENV
59-
59+
6060
- name: Retrieve post date
6161
run: echo "DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
6262

@@ -73,37 +73,37 @@ jobs:
7373
---
7474
title: "libGDX Jam ${{ github.event.inputs.month-and-year }}"
7575
classes: wide2
76-
76+
7777
header:
7878
teaser: /assets/images/posts/${{ env.DATE }}/header.jpg
79-
79+
8080
show_author: true
8181
author_username: "raeleus"
8282
author_displayname: "raeleus"
8383
8484
categories: news
8585
---
86-
86+
8787
With our ${{ github.event.inputs.number }} collaboration, the [libGDX Jam](/community/jams/) continues the time-honoured tradition of making awesome games using the best framework out there. We encourage camaraderie, teamwork, and good sportsmanship with a side of well-intentioned buffoonery. The general jam rules can as always be found [here](/community/jams/#rules). **To participate take a look at the official [itch.io page of the jam](${{ github.event.inputs.itchio-link }}).** The humorous jam trailer can be found on [YouTube](https://www.youtube.com/watch?v=${{ github.event.inputs.video-id }}).
88-
88+
8989
Be sure to get involved with the community by joining the libGDX Discord server!
90-
90+
9191
## Schedule
9292
_The theme is yet to be revealed._
9393
<!--The theme is **this**. Good luck everybody!-->
94-
94+
9595
- **Theme Submission:** ${{ github.event.inputs.date1 }} - ${{ github.event.inputs.date2 }}. Everyone will be allowed to submit a theme for the jam.
9696
- **Voting:** ${{ github.event.inputs.date3 }} - ${{ github.event.inputs.date4 }}. Everyone will vote on their favourite theme. May the best win!
9797
- **Jam:** ${{ github.event.inputs.date5 }} - ${{ github.event.inputs.date6 }}. Participants will create their games and rejoice!
98-
98+
9999
<!--## Submissions
100100
The libGDX Jam ${{ github.event.inputs.month-and-year }} is now over! We hope everyone had a lot of fun and are proud to present the [N submissions](${{ github.event.inputs.itchio-link }}/entries).-->
101101
EOF
102102
)
103103
echo "CONTENT<<EOF" >> $GITHUB_ENV
104104
echo "$CONTENT" >> $GITHUB_ENV
105105
echo "EOF" >> $GITHUB_ENV
106-
106+
107107
- name: Create post file
108108
run: |
109109
echo "${{ env.CONTENT }}" > _posts/${{ env.YEAR }}/${{ env.DATE }}-jam-${{ env.JAM-LINK-NAME }}.md
@@ -115,7 +115,7 @@ jobs:
115115
url: "https://img.youtube.com/vi/${{github.event.inputs.video-id}}/mqdefault.jpg"
116116
target: assets/images/posts/${{env.DATE}}/
117117
filename: header.jpg
118-
118+
119119
- name: Commit files
120120
run: |
121121
git config --local user.email "github-actions[bot]@users.noreply.github.com"
@@ -124,3 +124,57 @@ jobs:
124124
git add assets/
125125
git commit -m "Add ${{ github.event.inputs.month-and-year }} jam post"
126126
git push
127+
128+
# We can't rely on our usual deploy action since a push by an action doesn't trigger other
129+
# actions (see: https://github.com/orgs/community/discussions/25702), so we're copying
130+
# the stuff over from .github/workflows/github-pages.yml
131+
build:
132+
runs-on: ubuntu-latest
133+
needs: create-post
134+
135+
permissions:
136+
contents: read
137+
pages: write
138+
id-token: write
139+
140+
steps:
141+
- name: Checkout
142+
uses: actions/checkout@v4
143+
144+
- name: Setup Ruby
145+
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
146+
with:
147+
ruby-version: '3.1' # Not needed with a .ruby-version file
148+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
149+
cache-version: 0 # Increment this number if you need to re-download cached gems
150+
151+
- name: Setup Pages
152+
id: pages
153+
uses: actions/configure-pages@v3
154+
155+
- name: Build with Jekyll
156+
# Outputs to the './_site' directory by default
157+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
158+
env:
159+
JEKYLL_ENV: production
160+
161+
- name: Upload artifact
162+
# Automatically uploads an artifact from the './_site' directory by default
163+
uses: actions/upload-pages-artifact@v2
164+
165+
deploy:
166+
environment:
167+
name: github-pages
168+
url: ${{ steps.deployment.outputs.page_url }}
169+
runs-on: ubuntu-latest
170+
needs: build
171+
172+
permissions:
173+
contents: read
174+
pages: write
175+
id-token: write
176+
177+
steps:
178+
- name: Deploy to GitHub Pages
179+
id: deployment
180+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)