imnya.ng/.github/workflows/main.yml
2025-03-02 01:17:27 +09:00

36 lines
867 B
YAML

on:
push:
branches: [main]
workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the GitHub Actions Workflow page directly
name: Web Build
jobs:
checkout:
name: Checkout Code
runs-on: web-self-hosted
steps:
- uses: actions/checkout@v4
install_dependencies_and_build:
name: Install Dependencies and Build Web
runs-on: web-self-hosted
needs: checkout
steps:
- uses: actions/checkout@v4
- run: pwd && ls -al
- run: bun install
- run: bun run build
clean_up:
name: Clean Up Old Files
runs-on: web-self-hosted
needs: install_dependencies_and_build
steps:
- run: rm -rf /var/static/imnya.ng
deploy:
name: Deploy New Build
runs-on: web-self-hosted
needs: clean_up
steps:
- run: cp -r dist /var/static/imnya.ng