mirror of
https://github.com/Lapikud/tipilan.git
synced 2026-06-22 22:24:43 +00:00
Merge pull request #122 from Lapikud/v4ltages-patch-1
Delete full .github/workflows
This commit is contained in:
46
.github/workflows/build.yml
vendored
46
.github/workflows/build.yml
vendored
@@ -1,46 +0,0 @@
|
|||||||
name: build
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
ref:
|
|
||||||
description: Branch or tag to checkout
|
|
||||||
required: false
|
|
||||||
default: development
|
|
||||||
type: string
|
|
||||||
secrets:
|
|
||||||
USER_AUTH:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
runs-on: prox-2
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
with:
|
|
||||||
ref: ${{ inputs.ref }}
|
|
||||||
|
|
||||||
- name: Setup Bun
|
|
||||||
uses: oven-sh/setup-bun@v2
|
|
||||||
with:
|
|
||||||
bun-version: latest
|
|
||||||
|
|
||||||
- name: Install dependencies
|
|
||||||
run: bun install
|
|
||||||
|
|
||||||
- name: Ensure symlink to database before Drizzle migrations
|
|
||||||
run: |
|
|
||||||
rm -rf "$GITHUB_WORKSPACE/data"
|
|
||||||
ln -s /home/github/data "$GITHUB_WORKSPACE/data"
|
|
||||||
|
|
||||||
- name: Generate Drizzle schema
|
|
||||||
if: ${{ inputs.ref == 'main' }}
|
|
||||||
run: bun drizzle-kit generate
|
|
||||||
|
|
||||||
- name: Run Drizzle migrations
|
|
||||||
if: ${{ inputs.ref == 'main' }}
|
|
||||||
run: bun drizzle-kit migrate
|
|
||||||
|
|
||||||
- name: Build project
|
|
||||||
run: bun --bun run build
|
|
||||||
26
.github/workflows/deploy.yml
vendored
26
.github/workflows/deploy.yml
vendored
@@ -1,26 +0,0 @@
|
|||||||
name: deploy
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
secrets:
|
|
||||||
USER_AUTH:
|
|
||||||
required: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
deploy:
|
|
||||||
runs-on: prox-2
|
|
||||||
steps:
|
|
||||||
- name: Restart NextJS service
|
|
||||||
env:
|
|
||||||
SUDO_PASSWORD: ${{ secrets.USER_AUTH }}
|
|
||||||
run: echo "$SUDO_PASSWORD" | sudo -S systemctl restart nextjs.service
|
|
||||||
|
|
||||||
- name: Reload systemd daemon
|
|
||||||
env:
|
|
||||||
SUDO_PASSWORD: ${{ secrets.USER_AUTH }}
|
|
||||||
run: echo "$SUDO_PASSWORD" | sudo -S systemctl daemon-reload
|
|
||||||
|
|
||||||
- name: Check service status
|
|
||||||
env:
|
|
||||||
SUDO_PASSWORD: ${{ secrets.USER_AUTH }}
|
|
||||||
run: echo "$SUDO_PASSWORD" | sudo -S systemctl status nextjs.service --no-pager
|
|
||||||
19
.github/workflows/main.yml
vendored
19
.github/workflows/main.yml
vendored
@@ -1,19 +0,0 @@
|
|||||||
name: main
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- development
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
uses: ./.github/workflows/build.yml
|
|
||||||
secrets:
|
|
||||||
USER_AUTH: ${{ secrets.USER_AUTH }}
|
|
||||||
|
|
||||||
deploy:
|
|
||||||
needs: build
|
|
||||||
uses: ./.github/workflows/deploy.yml
|
|
||||||
secrets:
|
|
||||||
USER_AUTH: ${{ secrets.USER_AUTH }}
|
|
||||||
Reference in New Issue
Block a user