Skip to content

feat: added vite build #32

feat: added vite build

feat: added vite build #32

Workflow file for this run

name: GitHub Pages Deployment
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
runs-on: ubuntu-latest
environment: production
env:
VITE_TAG_MANAGER_ID: ${{ vars.TAG_MANAGER_ID }}
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Get latest commit hash
run: |
COMMIT_HASH=$(git rev-parse --short HEAD)
echo "VITE_COMMIT_HASH=$COMMIT_HASH" >> $GITHUB_ENV
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm install
- name: Build project with Vite
run: npm run build
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./dist
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4