Skip to content

Generate Atom news feeds #103

Generate Atom news feeds

Generate Atom news feeds #103

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-cl/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"