Skip to content

Commit

Permalink
fix: Use Bun in GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
KingRainbow44 committed Jul 31, 2024
1 parent 84acfad commit 67b3a1a
Showing 1 changed file with 46 additions and 42 deletions.
88 changes: 46 additions & 42 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,52 @@
name: Build & Deploy

on:
workflow_dispatch:
push:
branches:
- master
workflow_dispatch:
push:
branches:
- master

jobs:
build:
name: Build Web App
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Archive Production Artifact
uses: actions/upload-artifact@v3
with:
name: production
path: dist
build:
name: Build Web App
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Bun
uses: oven-sh/setup-bun@v2
with:
bun-version: latest
- name: Install Dependencies
run: bun install
- name: Build
run: bun run build
- name: Archive Production Artifact
uses: actions/upload-artifact@v3
with:
name: production
path: dist

deploy:
needs: build
name: Deploy to seiKiMo
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: production
path: dist
- name: ZIP Artifact
uses: vimtor/action-zip@v1
with:
files: dist/
dest: build.zip
- name: Deploy to seiKiMo
uses: KingRainbow44/upload-file@v1
with:
url: https://seikimo.moe/actions/site
file: build.zip
authorization: ${{ secrets.UPLOAD_TOKEN }}
method: POST
deploy:
needs: build
name: Deploy to seiKiMo
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- name: Download Artifact
uses: actions/download-artifact@v3
with:
name: production
path: dist
- name: ZIP Artifact
uses: vimtor/action-zip@v1
with:
files: dist/
dest: build.zip
- name: Deploy to seiKiMo
uses: KingRainbow44/upload-file@v1
with:
url: https://seikimo.moe/actions/site
file: build.zip
authorization: ${{ secrets.UPLOAD_TOKEN }}
method: POST

0 comments on commit 67b3a1a

Please sign in to comment.