From 64a00bdbef0e96425e2e7911994425b058bd25bd Mon Sep 17 00:00:00 2001 From: rizaldy Date: Mon, 20 Feb 2023 20:03:59 +0700 Subject: [PATCH] ci: setup initial gh actions --- .github/workflows/eleventy.yaml | 13 +++++++++++++ src/_data/site.js | 2 +- src/_includes/elements/footer.liquid | 2 +- 3 files changed, 15 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/eleventy.yaml diff --git a/.github/workflows/eleventy.yaml b/.github/workflows/eleventy.yaml new file mode 100644 index 0000000..622277b --- /dev/null +++ b/.github/workflows/eleventy.yaml @@ -0,0 +1,13 @@ +name: eleventy +on: [push] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@master + - name: get last sha + run: echo "LAST_COMMIT=`git rev-parse --short HEAD`" >> $GITHUB_ENV + - name: Build + uses: TartanLlama/actions-eleventy@master diff --git a/src/_data/site.js b/src/_data/site.js index 9ff7c7c..10ee0c1 100644 --- a/src/_data/site.js +++ b/src/_data/site.js @@ -1,7 +1,7 @@ const siteConfig = { name: "rizaldy.today", repo: "https://github.com/faultables/rizaldy.today", - last_commit: "main", + last_commit: process.env.LAST_COMMIT || "main", author: { name: "Rizaldy", avatar: "/assets/img/avatar.jpeg", diff --git a/src/_includes/elements/footer.liquid b/src/_includes/elements/footer.liquid index 8a4638b..01163cc 100644 --- a/src/_includes/elements/footer.liquid +++ b/src/_includes/elements/footer.liquid @@ -12,7 +12,7 @@
  • Colophon
  • Source CodeSource Code ({{ site.last_commit }})