-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 1.1 KB
/
Copy pathbuild-and-copy.yml
File metadata and controls
42 lines (33 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Build and Copy to Portfolio
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout exercisefinder
uses: actions/Checkout@v4
- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20
- name: install dependencies
run: npm ci
- name: Build vite app
run: npm run build
- name: clone Portfolio repo
run: git clone https://${{ secrets.NEXT_REPO_TOKEN }}@github.com/samdeitz/personal-portfolio.git
- name: copy build to portfolio
run: |
rm -rf personal-portfolio/public/exercisefinder
mkdir -p personal-portfolio/public/exercisefinder
cp -r dist/* personal-portfolio/public/exercisefinder
- name: commit & push
run: |
cd personal-portfolio
git config user.name "exercise-bot"
git config user.email "exercise-bot@github.com"
git add public/exercisefinder
git commit -m "Update exercise finder build" || exit 0
git push