Skip to content

get latest SUMO KB articles for all products including Thunderbird, Firefox and VPN #137

get latest SUMO KB articles for all products including Thunderbird, Firefox and VPN

get latest SUMO KB articles for all products including Thunderbird, Firefox and VPN #137

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
name: get latest SUMO KB articles for all products including Thunderbird, Firefox and VPN
on:
workflow_dispatch:
schedule:
- cron: '0 9,21 * * *'
jobs:
scheduled:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
# change this to (see https://github.com/ruby/setup-ruby#versioning):
# uses: ruby/setup-ruby@v1
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
cache-version: 3
ruby-version: '3.3'
- name: Install dependencies
run: |-
bundle install
- name: Get all SUMO KB articles
run: |-
timestamp=$(date --utc)
echo "\"${timestamp}\" +%Y"
bundle exec ./get-all-products-kb-articles-list.rb
bundle exec ./get-kb-article-detailed-list.rb allproducts-kb-title-slug-all-articles.csv
- name: Commit and push if it changed
run: |-
git config user.name "Automated"
git config user.email "[email protected]"
git add -A
timestamp=$(date -u)
git commit -m "Latest SUMO KB articles: ${timestamp}" || exit 0
git push