Skip to content

Commit

Permalink
Create update.yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanThatOneKid committed Feb 14, 2024
1 parent ea60e94 commit 2047666
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/update.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Update HTML

on:
workflow_dispatch:
pull_request:
branches: [main]

jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Set up Pandoc
uses: r-lib/actions/setup-pandoc@v1

- name: Run build script
id: build
run: |
bash build.sh
if git diff --exit-code --quiet; then
echo "updated=0" >> $GITHUB_OUTPUT
else
echo "updated=1" >> $GITHUB_OUTPUT
fi
- name: Commit and push if changes
if: steps.build.outputs.updated == '1'
run: git push

0 comments on commit 2047666

Please sign in to comment.