Skip to content

Commit

Permalink
Merge pull request #220 from lightning-js/feat/docs-deploy
Browse files Browse the repository at this point in the history
Auto update website docs
  • Loading branch information
michielvandergeest authored Nov 19, 2024
2 parents 799ac72 + 1e831f3 commit f82819b
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Trigger Website Docs Update
on:
push:
branches: [ master ]
jobs:
trigger:
runs-on: ubuntu-latest
steps:
- name: Check for changes in docs folder
id: check_docs_changes
run: |
if git diff --name-only HEAD^ HEAD | grep -q '^docs/'; then
echo "docs_changed=true" >> $GITHUB_ENV
else
echo "docs_changed=false" >> $GITHUB_ENV
fi
- name: Trigger Deployment
if: env.docs_changed == 'true'
run: |
response=$(curl -X POST -w "%{http_code}" -s -o /dev/null ${{ secrets.WEBSITE_DEPLOY_URL }})
if [ "$response" -eq 200 ]; then
echo "Deployment triggered successfully"
exit 0
else
echo "Failed to trigger deployment. Status code: $response"
exit 1
fi

0 comments on commit f82819b

Please sign in to comment.