mirror of https://github.com/Lapikud/tipilan
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
996 B
44 lines
996 B
name: build |
|
|
|
on: |
|
workflow_call: |
|
secrets: |
|
USER_AUTH: |
|
required: true |
|
|
|
jobs: |
|
build: |
|
runs-on: prox-1 |
|
steps: |
|
- name: Configure sudo password |
|
env: |
|
SUDO_PASSWORD: ${{ secrets.USER_AUTH }} |
|
run: echo "$SUDO_PASSWORD" | sudo -S echo "Sudo configured" |
|
|
|
- name: Clear .next cache |
|
run: sudo rm -rf $GITHUB_WORKSPACE/.next |
|
|
|
- name: Checkout code |
|
uses: actions/checkout@v4 |
|
|
|
- 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 ~/data $GITHUB_WORKSPACE/data |
|
|
|
- name: Generate Drizzle schema |
|
run: bun drizzle-kit generate |
|
|
|
- name: Run Drizzle migrations |
|
run: bun drizzle-kit migrate |
|
|
|
- name: Build project |
|
run: bun --bun run build
|
|
|