-
Notifications
You must be signed in to change notification settings - Fork 1
91 lines (77 loc) · 2.31 KB
/
rss-feed.yml
File metadata and controls
91 lines (77 loc) · 2.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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