mirror of
https://github.com/KevinMidboe/miljobilen-rss.git
synced 2025-10-29 09:40:22 +00:00
42 lines
851 B
YAML
42 lines
851 B
YAML
name: Run script generating new RSS file
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
- ci/test
|
|
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
|
|
|
|
- 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
|