From e18279f7a007271fe4ef1c1deb3b970a9f810a9a Mon Sep 17 00:00:00 2001 From: imnyang Date: Sun, 2 Mar 2025 01:14:50 +0900 Subject: [PATCH] Github Actions Update --- .github/workflows/main.yml | 34 +++++++++++++++++++++++++++++----- 1 file changed, 29 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e759b82..26a06ff 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -4,16 +4,40 @@ on: workflow_dispatch: # Run workflow manually (without waiting for the cron to be called), through the GitHub Actions Workflow page directly name: Web Build -jobs: - build: - name: Build the web +jobs: + checkout: + name: Checkout Code runs-on: web-self-hosted steps: - uses: actions/checkout@v4 + + install_dependencies: + name: Install Dependencies + runs-on: web-self-hosted + needs: checkout + steps: + - uses: actions/checkout@v4 - run: pwd && ls -al - run: bun install + + build: + name: Build Web + runs-on: web-self-hosted + needs: install_dependencies + steps: + - uses: actions/checkout@v4 - run: bun run build + + clean_up: + name: Clean Up Old Files + runs-on: web-self-hosted + needs: 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 - -