From 26647303c6bc441f1dfbef62e62d2774452be74b Mon Sep 17 00:00:00 2001 From: Alois Date: Sat, 2 May 2026 14:45:39 +0200 Subject: [PATCH] Fixed workflow --- .forgejo/workflows/deploy.yml | 27 +++++++++++++++++++ .github/workflows/update.yml | 49 ----------------------------------- 2 files changed, 27 insertions(+), 49 deletions(-) create mode 100644 .forgejo/workflows/deploy.yml delete mode 100644 .github/workflows/update.yml diff --git a/.forgejo/workflows/deploy.yml b/.forgejo/workflows/deploy.yml new file mode 100644 index 0000000..d80e5a7 --- /dev/null +++ b/.forgejo/workflows/deploy.yml @@ -0,0 +1,27 @@ +on: + push: + branches: + - main + +jobs: + deploy: + runs-on: docker + + steps: + - name: Check out repo + uses: https://data.forgejo.org/actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v2 + + - name: Install dependencies + run: bun install --frozen-lockfile + + - name: Build + run: bun run build + + - name: Install rsync + run: apt-get update && apt-get install -y rsync + + - name: Deploy + run: rsync -a --delete dist/ /var/lib/www/tensamin-homepage/ diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml deleted file mode 100644 index 87483b0..0000000 --- a/.github/workflows/update.yml +++ /dev/null @@ -1,49 +0,0 @@ -name: Deploy to GitHub Pages - -permissions: - contents: write - -on: - workflow_dispatch: - push: - branches: - - main - -jobs: - deploy: - name: Deploy to GitHub Pages - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Set up Bun - uses: oven-sh/setup-bun@v1 - with: - bun-version: latest - - - name: Install dependencies - run: bun install --frozen-lockfile - - - name: Build project - run: bun --bun run build - - - name: Ensure deploy branch exists - run: | - git config user.name "github-actions[bot]" - git config user.email "github-actions[bot]@users.noreply.github.com" - if ! git ls-remote --exit-code --heads origin gh-pages; then - git checkout --orphan gh-pages - git rm -rf . - git commit --allow-empty -m "Initialize gh-pages branch" - git push origin gh-pages - git checkout main - fi - - - name: Deploy to extra branch - uses: peaceiris/actions-gh-pages@v4 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dist - publish_branch: gh-pages