Files
silverbullet-icalendar/.github/workflows/publish.yml
sstent 6a862a5563
Some checks failed
Build SilverBullet Plug / build (push) Failing after 27s
Use GITHUB_TOKEN for push in CI
2026-02-16 07:50:27 -08:00

47 lines
1.2 KiB
YAML

name: Build SilverBullet Plug
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Deno
uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Build Plug
run: |
deno task build -- --no-check
- name: Commit and push changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add icalendar.plug.js
if git diff --quiet --staged; then
echo "No changes to commit"
else
git commit -m "Build and update icalendar.plug.js [skip ci]"
# Use the token for pushing to Gitea
git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@${{ github.server_url }}/${{ github.repository }}.git" HEAD:${{ github.ref_name }}
fi
- name: Upload Build Artifact
uses: actions/upload-artifact@v4
with:
name: icalendar-plug
path: "*.plug.js"