Skip to content

feat: nitrowebfetch (#183) #76

feat: nitrowebfetch (#183)

feat: nitrowebfetch (#183) #76

Workflow file for this run

name: Generate and Test RSS Feed
permissions:
contents: read
on:
push:
branches:
- main
paths:
- '**/*.md'
jobs:
generate:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
cache: 'npm'
cache-dependency-path: Utils/RSSfeed/package.json
- name: Install dependencies
working-directory: Utils/RSSfeed/
run: npm install
- name: Generate RSS feed and links file
working-directory: Utils/RSSfeed/
run: node feed.xml.js
- name: Upload RSS feed and links file
uses: actions/upload-artifact@v4
with:
name: feed-and-links
path: |
Utils/RSSfeed/public/
Utils/RSSfeed/links-to-test.json
retention-days: 1
e2e-test-and-deploy:
needs: generate
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'latest'
cache: 'npm'
cache-dependency-path: Utils/RSSfeed/package.json
- name: Install dependencies
working-directory: Utils/RSSfeed/
run: npm install
- name: Download RSS feed and links file
uses: actions/download-artifact@v4
with:
name: feed-and-links
path: Utils/RSSfeed
- name: Install Playwright browsers
working-directory: Utils/RSSfeed/
run: npx playwright install --with-deps
- name: Run e2e tests
working-directory: Utils/RSSfeed/
run: npm run test:e2e
- name: Upload test results
if: always()
uses: actions/upload-artifact@v4
with:
name: test-results
path: |
Utils/RSSfeed/playwright-report/
Utils/RSSfeed/test-results/
retention-days: 30
- name: Deploy to Cloudflare Pages
if: success()
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
command: pages deploy Utils/RSSfeed/public --project-name=frodigo-rss