Skip to content

fix cli

fix cli #55

Workflow file for this run

name: Deploy 🕊️
on:
push:
branches:
- main #✎ Adjust to branch you want to deploy
workflow_dispatch:
inputs:
secrets_txt:
description: 'Paste secrets here (format: KEY=VALUE)'
required: false
jobs:
build_and_deploy:
name: Build & Deploy 🚀
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4.1.7
- name: Import secrets
env:
SECRETS_CONTEXT: ${{ toJSON(secrets) }}
run: |
echo "$SECRETS_CONTEXT" | jq -r 'to_entries[] | "\(.key)=\(.value)"' >> "$GITHUB_ENV"
- name: Setup Bun
uses: oven-sh/setup-bun@v1
- name: Install dependencies
run: |
bun install
if [ -f bun.lockb ]; then
if git ls-files --error-unmatch bun.lockb > /dev/null 2>&1; then
if ! git diff --quiet bun.lockb; then
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add bun.lockb
git commit -m "chore: update bun.lockb"
git push
fi
else
echo "bun.lockb is not tracked by Git. Adding it..."
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add bun.lockb
git commit -m "chore: add bun.lockb"
git push
fi
else
echo "bun.lockb does not exist. Skipping commit."
fi
- name: Build project
run: bun run build && touch ./dist/.nojekyll #✎ Adjust to your build output folder (dist or out)
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4.6.0
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: public
folder: dist #✎ Adjust to your build output folder (dist or out)