Skip to content

Commit

Permalink
ci: build a sample feed
Browse files Browse the repository at this point in the history
  • Loading branch information
kskarthik committed Nov 23, 2024
1 parent 1903905 commit dd2a9f7
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 14 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/deno.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# This workflow will install Deno then run `deno lint` and `deno test`.
# For more information see: https://github.com/denoland/setup-deno

name: Deno
name: Build

on:
push:
Expand All @@ -29,12 +29,12 @@ jobs:
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
# Uncomment this step to verify the use of 'deno fmt' on each commit.

- name: Verify formatting
run: deno fmt --check

- name: Run linter
run: deno lint

- name: Build
run: deno run main.ts
- name: Create feed
run: deno task run feed.xml
16 changes: 10 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
# gstfeed

A simple tool which converts News and updates from the Indian [GST portal](https://gst.gov.in) as RSS (atom) feeds
which can then be used in various integrations (like feed readers, bots)
A simple tool which converts News and updates from the Indian
[GST portal](https://gst.gov.in) as RSS (atom) feeds which can then be used in
various integrations (like feed readers, bots)

# Installation

## Build Requirements

- [Deno](https://deno.com)

## Usage

To run the script:

```
deno run main.ts
deno task run
```

This will generate the `feed.xml` in the same directory which can be copied to any location of choice.
This will generate the `feed.xml` in the same directory which can be copied to
any location of choice.

The script optionally accepts custom path to the feed output as first argument

Expand All @@ -29,12 +33,12 @@ To compile as binary:
deno task build
```

For development
For development:

```
deno task dev
```

# License

this script is licensed under the GNU `GPLv3`
This script is licensed under the GNU `GPLv3`
5 changes: 3 additions & 2 deletions deno.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"tasks": {
"dev": "deno run --watch --allow-net main.ts"
"build": "deno compile --allow-net main.ts "
"dev": "deno run --watch --allow-net --allow-write main.ts",
"build": "deno compile --allow-net --allow-write main.ts",
"run": "deno run --allow-net --allow-write main.ts"
},
"imports": {
"@feed/feed": "jsr:@feed/feed@^1.1.0"
Expand Down
2 changes: 1 addition & 1 deletion main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function fetchPayload() {
link: `https://www.gst.gov.in/newsandupdates/read/${item.id}`,
id: `${item.id}`,
updated: formatDate(item.date),
summary: "item.title",
summary: item.title,
content: {
body: item.content,
type: "html",
Expand Down

0 comments on commit dd2a9f7

Please sign in to comment.