mirror of
https://codeberg.org/valpackett/tiddlypwa.git
synced 2025-12-06 02:30:48 -08:00
Switch to Forgejo Actions
This commit is contained in:
parent
05d24a9efd
commit
2961396310
3 changed files with 44 additions and 41 deletions
22
.forgejo/workflows/check.yaml
Normal file
22
.forgejo/workflows/check.yaml
Normal 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
|
||||
22
.forgejo/workflows/upload.yaml
Normal file
22
.forgejo/workflows/upload.yaml
Normal 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 }}
|
||||
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue