Skip to content

Commit

Permalink
Merge pull request #4721 from galaxyproject/cama-gecko
Browse files Browse the repository at this point in the history
send news to hub social
  • Loading branch information
shiltemann authored Feb 13, 2024
2 parents c0577ba + 31558ce commit a06e767
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 8 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
bundle pristine ffi
# END Dependencies

- name: Build Site
- name: Prepare Site Metadata
run: |
gem install bundler
python -m pip install --upgrade pip
Expand All @@ -62,6 +62,9 @@ jobs:
curl --retry 5 https://gallantries.github.io/video-library/api/videos.json > metadata/video-library.json
curl --retry 5 https://gallantries.github.io/video-library/api/sessions.json > metadata/session-library.json
rdoc bin _plugins/ --output gtn_rdoc
- name: Build Site
run: |
JEKYLL_ENV=production bundle exec jekyll build --strict_front_matter -d _site/training-material
cp metadata/feedback.csv _site/training-material/api/feedback.csv
env:
Expand Down
12 changes: 6 additions & 6 deletions _plugins/jekyll-topic-filter.rb
Original file line number Diff line number Diff line change
Expand Up @@ -464,16 +464,16 @@ def self.resolve_material(site, material)

all_resources = slides + tutorials
page_obj['mod_date'] = all_resources
.map{|p| Gtn::ModificationTimes.obtain_time(p[1].path) }
.max
.map { |p| Gtn::ModificationTimes.obtain_time(p[1].path) }
.max

page_obj['pub_date'] = all_resources
.map{|p| Gtn::PublicationTimes.obtain_time(p[1].path)}
.min
.map { |p| Gtn::PublicationTimes.obtain_time(p[1].path) }
.min

page_obj['version'] = all_resources
.map{|p| Gtn::ModificationTimes.obtain_modification_count(p[1].path) }
.max
.map { |p| Gtn::ModificationTimes.obtain_modification_count(p[1].path) }
.max

folder = material['dir']

Expand Down
5 changes: 5 additions & 0 deletions bin/news.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@
server: 'https://matrix.org',
room: '!UQXYBSjdrLHcWgegmg:gitter.im',
}
'hub-social' => {
server: 'https://matrix.org',
room: '!gegHcnUCDklLbtVQor:matrix.org',
}
}
# rubocop:enable Style/GlobalVars
#
Expand Down Expand Up @@ -268,3 +272,4 @@ def send_news(output, options, channel: 'default')
# GOATS: Rss/news only.
output, newsworthy = build_news(data, only_news: true)
send_news(output, options, channel: 'wg-goat') if newsworthy
send_news(output, options, channel: 'hub-social') if newsworthy
2 changes: 1 addition & 1 deletion bin/workflows-fetch.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def request(url)
def fetch_workflows(server)
begin
response = request("#{server}/api/workflows/")
rescue
rescue StandardError
puts "ERROR: Failed to fetch workflows from #{server}"
return []
end
Expand Down

0 comments on commit a06e767

Please sign in to comment.