Skip to content

Commit 2415e4d

Browse files
committed
Update github actions workflow to deploy to external repo
1 parent a367c1e commit 2415e4d

File tree

1 file changed

+13
-10
lines changed

1 file changed

+13
-10
lines changed

.github/workflows/publish.yml

+13-10
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,33 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Checkout
14-
uses: actions/checkout@v2
15-
with:
16-
token: ${{ secrets.REPO_ACCESS }}
14+
uses: actions/checkout@v4
1715

1816
- name: Setup
19-
uses: actions/setup-node@v2
17+
uses: actions/setup-node@v4
2018
with:
21-
node-version: '14'
19+
node-version: '20'
20+
cache: yarn
21+
env:
22+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2223

23-
- name: Install
24-
run: npm install
24+
- name: Install dependencies
25+
run: yarn install --prefer-offline
2526
env:
2627
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2728

2829
- name: Build
2930
continue-on-error: false
30-
run: npm run-script build
31+
run: yarn build
3132
env:
3233
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
3334

3435
- name: Publish
3536
if: github.event_name == 'push'
36-
uses: peaceiris/actions-gh-pages@v3
37+
uses: peaceiris/actions-gh-pages@v4
3738
with:
3839
github_token: ${{ secrets.GITHUB_TOKEN }}
40+
personal_token: ${{ secrets.PERSONAL_TOKEN }}
41+
external_repository: adamgraham/adamgraham.github.io
42+
publish_branch: master
3943
publish_dir: public
40-
publish_branch: public

0 commit comments

Comments
 (0)