mirror of
https://github.com/KevinMidboe/miljobilen-rss.git
synced 2025-10-29 17:50:23 +00:00
41 lines
839 B
YAML
41 lines
839 B
YAML
name: Generate & upload RSS file
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
schedule:
|
|
- cron: "0 0 * * *" # Run every day at midnight
|
|
|
|
jobs:
|
|
generate-rss:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: 'read'
|
|
id-token: 'write'
|
|
|
|
steps:
|
|
- name: Checkout Repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: '21'
|
|
|
|
- name: Run Script
|
|
run: node src/run.js 'solberg' 1
|
|
|
|
- id: 'auth-to-gcloud'
|
|
uses: 'google-github-actions/auth@v2'
|
|
with:
|
|
credentials_json: '${{ secrets.GOOGLE_CREDENTIALS }}'
|
|
|
|
- id: 'upload-rss-file'
|
|
uses: 'google-github-actions/upload-cloud-storage@v2'
|
|
with:
|
|
path: 'rss.xml'
|
|
destination: 'miljobilen-rss'
|
|
process_gcloudignore: false
|