Skip to content

Commit f72c7a0

Browse files
committed
Update Github Action
1 parent 54c5943 commit f72c7a0

2 files changed

Lines changed: 33 additions & 12 deletions

File tree

.github/workflows/build-artifacts.yml

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,30 +7,50 @@ on:
77
pull_request:
88
workflow_dispatch:
99

10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
1015
jobs:
1116
build:
1217
runs-on: ubuntu-latest
1318

1419
steps:
1520
- name: Check out repository
16-
uses: actions/checkout@v4
21+
uses: actions/checkout@v5
1722

1823
- name: Set up Python
19-
uses: actions/setup-python@v5
24+
uses: actions/setup-python@v6
2025
with:
2126
python-version: "3.x"
2227

28+
- name: Configure GitHub Pages
29+
uses: actions/configure-pages@v5
30+
2331
- name: Build artifacts
2432
run: python3 scripts/build_artifacts.py
2533

26-
- name: Upload demo page
27-
uses: actions/upload-artifact@v4
34+
- name: Upload build artifacts
35+
uses: actions/upload-artifact@v6
2836
with:
29-
name: test-page
30-
path: dist/test.html
37+
name: build-artifacts
38+
path: dist/
3139

32-
- name: Upload MediaWiki export
33-
uses: actions/upload-artifact@v4
40+
- name: Upload Pages artifact
41+
uses: actions/upload-pages-artifact@v4
3442
with:
35-
name: mediawiki-export
36-
path: dist/mediawiki-export.xml
43+
path: dist/
44+
45+
deploy:
46+
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main'
47+
needs: build
48+
runs-on: ubuntu-latest
49+
environment:
50+
name: github-pages
51+
url: ${{ steps.deployment.outputs.page_url }}
52+
53+
steps:
54+
- name: Deploy to GitHub Pages
55+
id: deployment
56+
uses: actions/deploy-pages@v4

TODO.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,20 @@
22

33
* align usage documentation (specs, wiki doc page, visual test page)
44
* Need to support at least on-wiki and on-web
5-
* Need test cases to be a little more strategic? Maybe show js, nojs, and wiki all together? Not sure we really need a test case for every possible situation. It would be overwhelming.
65
* improve visual test page
76
* Support enter-your-own call to lua? (may need wasm Lua...)
87
* rely on lua (either at build time or in the browser) instead of hardcoded lua outputs
98
* Could have build-time lua be an optional step with cached output json
109
* Would need shims for mw stuff
10+
* Need test cases to be a little more strategic? Maybe show js, nojs, and wiki all together? Not sure we really need a test case for every possible situation. It would be overwhelming.
1111
* Link the export file for mediawiki to import
1212
* Figure out what MediaWiki:Gadgets-definition could look like if auto-imported.
1313
* How will MediaWiki handle "duplicate" pages?
1414
* audit code for readability and obviousness
1515
* Maybe do a little work to make styling and regional time formats be better supported?
16-
* What timezone formats are supported as inputs?
16+
* What timezone formats are supported as inputs? +8, UTC+8, etc?
1717
* error visibility when given a bad (or likely bad) input?
18+
* Should add an error category tag and pass the input as output. If either start or end is bad, just do this.
1819
* Bugs
1920
* Tooltip supports click to open. Stays open when clicking again. Is that expected? Maybe close on second click? And/or just make it being open be tap only? Currently tabbable. Is that a good idea?
2021
* The server configs are hardcoded, but should live in json.

0 commit comments

Comments
 (0)