Skip to content

Commit 970b10e

Browse files
committed
chore: add ci/cd
1 parent 7c5e797 commit 970b10e

File tree

3 files changed

+51
-4
lines changed

3 files changed

+51
-4
lines changed

.github/workflows/deploy.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Deploy to GitHub Page
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version: [18]
14+
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v3
18+
19+
- name: Setup pnpm
20+
uses: pnpm/[email protected]
21+
with:
22+
version: latest
23+
24+
- name: Use Node.js ${{ matrix.node-version }}
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version: ${{ matrix.node-version }}
28+
cache: 'pnpm'
29+
30+
- name: Install dependencies
31+
run: pnpm i
32+
33+
- name: Build project
34+
run: pnpm run build
35+
36+
- name: Setup Pages
37+
uses: actions/configure-pages@v3
38+
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v1
41+
with:
42+
path: './dist'
43+
44+
- name: Deploy to GitHub Pages
45+
id: deployment
46+
uses: actions/deploy-pages@v1

src/App.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { motion, useScroll, useTransform } from 'framer-motion';
1+
import { motion, useTransform } from 'framer-motion';
22
import { useMemo, useRef } from 'react';
33

44
import { useScrollImageSequenceFramerCanvas } from './hooks';

vite.config.ts

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { defineConfig } from 'vite'
2-
import react from '@vitejs/plugin-react'
1+
import react from '@vitejs/plugin-react';
2+
import { defineConfig } from 'vite';
33

44
// https://vitejs.dev/config/
55
export default defineConfig({
6+
base: '/react-image-sequence-demo/',
67
plugins: [react()],
7-
})
8+
});

0 commit comments

Comments
 (0)