Skip to content

Merge branch 'master' of github.com:cayb0rg/body-tracking-avatar-cap4720 #21

Merge branch 'master' of github.com:cayb0rg/body-tracking-avatar-cap4720

Merge branch 'master' of github.com:cayb0rg/body-tracking-avatar-cap4720 #21

Workflow file for this run

name: Deploy Vite site to Pages
on:
# Runs on pushes targeting the default branch
push:
branches: ["master"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
jobs:
# Build job
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: create env file
run: |
touch .env
echo VITE_BASE_PATH='/body-tracking-avatar-cap4720/' >> .env
- name: Setup Node
uses: actions/setup-node@v4
- name: Install dependencies
uses: bahmutov/npm-install@v1
- name: Build project
run: npm run build
- name: Upload production-ready build files
uses: actions/upload-artifact@v4
with:
name: production-files
path: ./dist
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: production-files
path: ./dist
- name: Deploy to GitHub Pages
id: deployment
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist