Skip to content
This repository has been archived by the owner on Nov 15, 2024. It is now read-only.

Generate Atom news feeds #84

Generate Atom news feeds

Generate Atom news feeds #84

name: Generate Atom news feeds
on:
repository_dispatch:
types:
- resource-published
schedule:
# Runs daily in case any event was missed
- cron: '30 0 * * *'
pull_request:
paths:
- '.github/ci/**'
- '.github/workflows/generate-atom-news-feeds.yaml'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
# The bot user https://github.com/hlx-macktrucks-bot is used to commit the changes. The personal access token
# must be created from: https://github.com/settings/tokens
# The token is then stored in the secrets of the this.
# see https://github.com/hlxsites/vg-macktrucks-gt/settings/secrets/actions
token: ${{ secrets.BOT_ACCESS_TOKEN }}
- name: Configure git
run: |
git config user.name "GitHubActions"
git config user.email "<>"
- uses: actions/setup-node@v3
with:
node-version: '18'
- name: Install dependencies
working-directory: ./.github/ci
run: npm install
- name: Generate Feed
working-directory: ./.github/ci
run: node generate-news-feed.js
- name: Commit and push changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "Update feed.xml"