fix: Use Bun in GitHub Actions #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build & Deploy | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
jobs: | |
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 |