Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/queensferryme/hugo-theme-texify.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorQueensferry <queensferry.me@gmail.com>2022-03-31 10:41:17 +0300
committerQueensferry <queensferry.me@gmail.com>2022-03-31 10:51:41 +0300
commitbc39ef755aae40233ce3360b9b4b979d31dc4f6c (patch)
treed63aa326cba25c1191664f7e0a5337717af32e50
parent3933a1480c81c9dcf552522937d8af97747a028b (diff)
ci: use gha to auto-update `exampleSite/content`
-rw-r--r--.github/workflows/update.yml25
-rw-r--r--.gitignore1
-rwxr-xr-xtools/update.sh7
3 files changed, 26 insertions, 7 deletions
diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml
new file mode 100644
index 0000000..c65de26
--- /dev/null
+++ b/.github/workflows/update.yml
@@ -0,0 +1,25 @@
+name: Update
+
+on:
+ schedule:
+ - cron: '0 0 * * 0'
+ workflow_dispatch:
+
+jobs:
+ update:
+ runs-on: ubuntu-latest
+
+ steps:
+ - uses: actions/checkout@v3
+ - uses: fregante/setup-git-user@v1
+ - name: Update exampleSite/content
+ run: |
+ git clone https://github.com/gohugoio/hugoBasicExample.git
+ rm -rf exampleSite/content
+ mv hugoBasicExample/content exampleSite
+ rm -rf hugoBasicExample
+ - name: Push Updates
+ run: |
+ git add .
+ git diff-index --quiet HEAD || git commit -m "chore: update `exampleSite/content`"
+ git push
diff --git a/.gitignore b/.gitignore
index 518de54..39aa592 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,7 @@
# Hugo output
public/
resources/
+.hugo_build.lock
# OS files
desktop.ini
diff --git a/tools/update.sh b/tools/update.sh
deleted file mode 100755
index 3c7f19e..0000000
--- a/tools/update.sh
+++ /dev/null
@@ -1,7 +0,0 @@
-#!/bin/bash
-
-git clone https://github.com/gohugoio/hugoBasicExample.git
-rm -rf exampleSite/content
-mv hugoBasicExample/content exampleSite
-rm -rf hugoBasicExample
-