Switch to Forgejo Actions

This commit is contained in:
Val Packett 2025-04-02 18:30:17 -03:00
parent 05d24a9efd
commit 2961396310
3 changed files with 44 additions and 41 deletions

View file

@ -0,0 +1,22 @@
---
on:
push:
branches: [trunk]
pull_request:
types: [opened, synchronize, reopened]
jobs:
test:
runs-on: val-arm64
steps:
- name: Checkout
uses: https://code.forgejo.org/actions/checkout@v4
- name: Get Deno
run: curl -fsSL https://deno.land/install.sh | sh
- name: Run server tests
run: /root/.deno/bin/deno test server
- name: Try hash-admin-password
run: echo uwu | /root/.deno/bin/deno run server/hash-admin-password.ts
- name: Check client build
run: /root/.deno/bin/deno run --allow-env --allow-read --allow-write=output npm:tiddlywiki@5.3.5 --build
- name: Check formatting
run: /root/.deno/bin/deno fmt --check --ignore="**/*.css" plugins server

View file

@ -0,0 +1,22 @@
---
on:
push:
branches: [release]
jobs:
test:
runs-on: val-arm64
steps:
- name: Checkout
uses: https://code.forgejo.org/actions/checkout@v4
- name: Fetch theme
run: mkdir notebook && curl -L https://github.com/valpackett/Notebook/archive/e2c61ccd6e9db5cfcbc77e54eccc8b5961da5831.tar.gz | tar -xvzf - -C notebook --strip-components=1
- name: Build client
run: npx tiddlywiki@5.3.5 --build
env:
TIDDLYWIKI_THEME_PATH: notebook/themes
TIDDLYWIKI_PLUGIN_PATH: notebook/plugins
- name: Upload result
run: sh bunny.sh
env:
BUNNY_BUCKET: ${{ secrets.BUNNY_BUCKET }}
BUNNY_KEY: ${{ secrets.BUNNY_KEY }}

View file

@ -1,41 +0,0 @@
when:
- event: push
steps:
- name: test
image: denoland/deno:alpine
pull: true
commands:
- deno test server
- echo uwu | deno run server/hash-admin-password.ts
- name: fmt
image: denoland/deno:alpine
commands:
- deno fmt --check --ignore="**/*.css" plugins server
- name: fetch_theme
image: alpine/curl
when:
- event: push
branch: release
commands:
- mkdir notebook
- curl -L https://github.com/valpackett/Notebook/archive/e2c61ccd6e9db5cfcbc77e54eccc8b5961da5831.tar.gz | tar -xvzf - -C notebook --strip-components=1
- name: build
image: denoland/deno:alpine
environment:
TIDDLYWIKI_THEME_PATH: notebook/themes
TIDDLYWIKI_PLUGIN_PATH: notebook/plugins
commands:
- deno run --allow-env --allow-read --allow-write=output npm:tiddlywiki@5.3.5 --build
- name: push
image: alpine/curl
when:
- event: push
branch: release
environment:
BUNNY_BUCKET:
from_secret: BUNNY_BUCKET
BUNNY_KEY:
from_secret: BUNNY_KEY
commands:
- sh bunny.sh