Skip to content

Commit

Permalink
Update github actions workflow to deploy to external repo
Browse files Browse the repository at this point in the history
  • Loading branch information
adamgraham committed Oct 20, 2024
1 parent a367c1e commit 2415e4d
Showing 1 changed file with 13 additions and 10 deletions.
23 changes: 13 additions & 10 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,33 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
token: ${{ secrets.REPO_ACCESS }}
uses: actions/checkout@v4

- name: Setup
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '14'
node-version: '20'
cache: yarn
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Install
run: npm install
- name: Install dependencies
run: yarn install --prefer-offline
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Build
continue-on-error: false
run: npm run-script build
run: yarn build
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Publish
if: github.event_name == 'push'
uses: peaceiris/actions-gh-pages@v3
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
personal_token: ${{ secrets.PERSONAL_TOKEN }}
external_repository: adamgraham/adamgraham.github.io
publish_branch: master
publish_dir: public
publish_branch: public

0 comments on commit 2415e4d

Please sign in to comment.