Skip to content

Commit

Permalink
[+] try to add workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
LS-KR committed Nov 10, 2023
1 parent 665adbd commit 09c592a
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Vite Build

on:
push:
branches: [ main ]
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
contents: write
pages: write
id-token: write

jobs:
build:
runs-on: ubuntu-latest
permissions: write-all

steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
- name: Cache node_modules
uses: actions/cache@v3
id: cache
with:
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-node-

- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --production --frozen-lockfile

- name: Build
run: yarn build

- name: Deploy to GitHub branch
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist

0 comments on commit 09c592a

Please sign in to comment.