Skip to content

Commit e48f88f

Browse files
authored
auto update portfolio?
1 parent b3bdf18 commit e48f88f

1 file changed

Lines changed: 36 additions & 0 deletions

File tree

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Update Portfolio Site
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Trigger on updates to the main branch; adjust if needed
7+
release:
8+
types: [published] # Trigger on release publication
9+
10+
jobs:
11+
update-portfolio:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Code
15+
uses: actions/checkout@v2
16+
17+
- name: Clone Portfolio Repo
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.PAT_FOR_PORTFOLIO_REPO }}
20+
run: |
21+
git clone https://github.com/peterbenoit/peterbenoit.github.io portfolio
22+
cd portfolio
23+
git config user.name "GitHub Action"
24+
git config user.email "github-action@github.com"
25+
26+
- name: Copy Updated Library
27+
run: cp -r ./dist/* ./portfolio/libraries/ResourceLoader
28+
29+
- name: Commit and Push Changes
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.PAT_FOR_PORTFOLIO_REPO }}
32+
run: |
33+
cd portfolio
34+
git add .
35+
git commit -m "Update ResourceLoader in portfolio"
36+
git push

0 commit comments

Comments
 (0)