From 18b5614e80bd9485669e58748328e14c47447abf Mon Sep 17 00:00:00 2001 From: streetturtle Date: Sun, 23 Jan 2022 13:37:07 -0500 Subject: Test new gh-action --- .github/workflows/update-site.yml | 11 +++++++++++ scripts/update_site.sh | 7 +++++++ 2 files changed, 18 insertions(+) create mode 100644 .github/workflows/update-site.yml create mode 100644 scripts/update_site.sh diff --git a/.github/workflows/update-site.yml b/.github/workflows/update-site.yml new file mode 100644 index 0000000..4dee086 --- /dev/null +++ b/.github/workflows/update-site.yml @@ -0,0 +1,11 @@ +name: update site + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Rename readme file + run: ./screepts/update_site.sh \ No newline at end of file diff --git a/scripts/update_site.sh b/scripts/update_site.sh new file mode 100644 index 0000000..5f0f5d6 --- /dev/null +++ b/scripts/update_site.sh @@ -0,0 +1,7 @@ +for D in *; do + if [[ -d "${D}" ]] && [[ ${D} == *"-widget"* ]]; then + echo "${D}" + cp ${D}/README.md ./_widgets/${D}.md + sed -i '1s/^/---\nlayout: page\n---\n/' ./_widgets/${D}.md + fi +done \ No newline at end of file -- cgit v1.2.3