Skip to content

Commit 6232358

Browse files
authored
Merge pull request #304 from iherman/main
Generation update
2 parents 255afe0 + 0ab4343 commit 6232358

37 files changed

+801
-6724
lines changed

.eslintignore

Lines changed: 0 additions & 1 deletion
This file was deleted.

.eslintrc

Lines changed: 0 additions & 121 deletions
This file was deleted.

.github/workflows/generate.yml

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,50 @@
1-
name: Automatic Report generation
1+
# Relies on the standard GitHub action setup to deploy to GitHub Pages
2+
# The really specific details are in the steps that generates the index files
3+
# (and the deployment of deno as an underling tool).
4+
name: Publish to Github Pages
25
on:
36
push:
47
branches: [main]
5-
paths: ["reports/**", "tests/**", "src/**", "docs/drafts/*.html", "docs/drafts/config.json"]
8+
paths: ["reports/**", "tests/**", "src/**", "docs/*.html", "docs/contributing.md", "docs/config.json"]
69

7-
jobs:
8-
build:
9-
name: Generate Reports using NodeJS
10+
# Allows workflow to be triggered manually from the Actions tab
11+
workflow_dispatch:
1012

11-
runs-on: ubuntu-latest
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
1218

13-
strategy:
14-
matrix:
15-
node-version: [22.x]
19+
# Allow one concurrent deployment
20+
concurrency:
21+
group: "pages"
22+
cancel-in-progress: true
1623

24+
jobs:
25+
deploy:
26+
environment:
27+
name: github-pages
28+
url: ${{ steps.deployment.outputs.page_url }}
29+
runs-on: ubuntu-latest
1730
steps:
18-
- uses: actions/checkout@v3
19-
- uses: actions/setup-node@v3
31+
- name: Checkout the repository
32+
uses: actions/checkout/@v4
33+
- name: Setup Deno
34+
uses: denoland/setup-deno@v2
2035
with:
21-
node-version: ${{ matrix.node-version }}
22-
- run: npm ci
23-
- run: npm run generate
24-
- name: setup git config
36+
deno-version: v2.x
37+
- name: Generate the index files
38+
# Details depend on where the script is located
2539
run: |
26-
git config user.name "Report generation bot"
27-
git config user.email "<>"
28-
- name: commit the changes
29-
run: |
30-
git add docs/*.html
31-
git add docs/fragments/*.html
32-
git add reports/xx-*.json
33-
git add docs/opds/*.json
34-
git commit -am "Automated report generation"
35-
git push origin main
36-
37-
40+
(cd generate/src; deno run -A main.ts; rm deno.lock)
41+
- name: Setup Github Pages
42+
uses: actions/configure-pages@v5
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v3
45+
with:
46+
# Upload entire repository
47+
path: '.'
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)