summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/build.yml2
-rwxr-xr-x.github/workflows/update-site.yml43
2 files changed, 45 insertions, 0 deletions
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 1bfeee3..bdb08e1 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -8,6 +8,8 @@ on:
push:
branches:
- '*'
+ paths:
+ - '**.lua'
pull_request:
branches: [ master ]
diff --git a/.github/workflows/update-site.yml b/.github/workflows/update-site.yml
new file mode 100755
index 0000000..7415c2e
--- /dev/null
+++ b/.github/workflows/update-site.yml
@@ -0,0 +1,43 @@
+name: update site
+
+on:
+ push:
+ branches:
+ - 'master'
+ paths:
+ - '**/README.md'
+
+ # Allows you to run this workflow manually from the Actions tab
+ workflow_dispatch:
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: Generate md
+ run: ./scripts/update_site.sh
+
+ - name: Push to gh-pages branch
+ run: |
+ git config --global user.name 'GitHub Action'
+ git config --global user.email 'action@github.com'
+ git add ./_widgets
+ git add ./assets/img/widgets
+ git stash
+ git fetch
+ echo "git checkout gh-pages"
+ git checkout gh-pages
+ rm -rf ./_widgets
+ rm -rf ./assets/img/widgets
+ ls -alF
+ echo "git stash pop"
+ git checkout stash -- ./_widgets
+ git checkout stash -- ./assets/img/widgets
+ git add ./_widgets
+ git add ./assets/img/widgets
+ git commit -m "update from master"
+ git push origin gh-pages
+