Skip to content

Commit

Permalink
Add action for re-deploying the site as its updated
Browse files Browse the repository at this point in the history
  • Loading branch information
KingRainbow44 committed Aug 12, 2023
1 parent 5355e8f commit 26cce86
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
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@v2
- name: Install Dependencies
run: npm install
- name: Build
run: npm run build
- name: Archive Production Artifact
uses: actions/upload-artifact@v2
with:
name: production
path: build

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@v2
with:
name: production
path: build
- name: ZIP Artifact
uses: vimtor/action-zip@v1
with:
files: build/
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 26cce86

Please sign in to comment.