File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Copy to Portfolio
2+
3+ on :
4+ push :
5+ branches : [main]
6+
7+ jobs :
8+ build :
9+ runs-on : ubuntu-latest
10+
11+ steps :
12+ - name : Checkout punch in page
13+ uses : actions/Checkout@v4
14+
15+ - name : Setup node
16+ uses : actions/setup-node@v4
17+ with :
18+ node-version : 20
19+
20+ - name : install dependencies
21+ run : npm ci
22+
23+ - name : Build punch in
24+ run : npm run build
25+
26+ - name : clone Portfolio repo
27+ run : git clone https://${{ secrets.PORTFOLIO_REPO_TOKEN }}@github.com/samdeitz/personal-portfolio.git
28+
29+ - name : Install portfolio dependencies
30+ run : |
31+ cd personal-portfolio
32+ npm ci
33+
34+ - name : copy build to portfolio
35+ run : |
36+ rm -rf personal-portfolio/public/md-punch-in
37+ mkdir -p personal-portfolio/public/md-punch-in
38+ cp -r dist/* personal-portfolio/public/md-punch-in
39+
40+ - name : configure git for commit and deploy
41+ run : |
42+ git config --global user.name "punch-in-bot"
43+ git config --global user.email "punch-in-bot@github.com"
44+
45+ - name : commit & push
46+ run : |
47+ cd personal-portfolio
48+ git add public/md-punch-in
49+ git commit -m "Update punch in build" || exit 0
50+ git push
51+
52+ - name : deploy portfolio
53+ env :
54+ GH_TOKEN : ${{ secrets.PORTFOLIO_REPO_TOKEN }}
55+ run : |
56+ cd personal-portfolio
57+ npm run deploy
58+
You can’t perform that action at this time.
0 commit comments