Skip to content

Commit

Permalink
CI: Don't try to update website in a forked repository
Browse files Browse the repository at this point in the history
  • Loading branch information
jon-turney authored and mensinda committed Jun 11, 2021
1 parent 89f2f78 commit 1ab0694
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:

jobs:
update_website:
env:
HAS_SSH_KEY: ${{ secrets.WEBSITE_PRIV_KEY != '' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
Expand All @@ -23,13 +25,18 @@ jobs:
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.WEBSITE_PRIV_KEY }}"
- name: Update website
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
if: env.HAS_SSH_KEY == 'true'
- name: Build website
run: |
git config --global user.name "github-actions"
git config --global user.email "github-actions@github.com"
cd docs
meson setup _build
ninja -C _build
- name: Update website
env:
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
run: |
cd docs
ninja -C _build upload
if: env.HAS_SSH_KEY == 'true'

0 comments on commit 1ab0694

Please sign in to comment.