Skip to content

Commit

Permalink
use new deploy key
Browse files Browse the repository at this point in the history
  • Loading branch information
ssolson committed Feb 3, 2025
1 parent 17b6246 commit 442c995
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:
# Create .nojekyll file to prevent GitHub Pages from ignoring files that begin with an underscore
touch _build/html/.nojekyll
- name: Deploy to GitHub Pages
- name: Deploy to GitHub Pages (Main Branch)
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: peaceiris/actions-gh-pages@v3
with:
Expand All @@ -44,14 +44,22 @@ jobs:
enable_jekyll: false
full_commit_message: ${{ github.event.head_commit.message }}

- name: Setup SSH for PR Previews
if: github.event_name == 'pull_request'
run: |
mkdir -p ~/.ssh
echo "${{ secrets.GH_PAGES_DEPLOY_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan github.com >> ~/.ssh/known_hosts
- name: Deploy Preview for PRs
if: github.event_name == 'pull_request'
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
deploy_key: ${{ secrets.GH_PAGES_DEPLOY_KEY }}
publish_dir: ./docs/_build/html
destination_dir: pr-previews/${{ github.event.number }}
external_repository: ${{ github.repository }}
external_repository: MHKiT-Software/MHKiT
keep_files: true
enable_jekyll: false
full_commit_message: ${{ github.event.head_commit.message }}

0 comments on commit 442c995

Please sign in to comment.