ci: setup initial gh actions

This commit is contained in:
rizaldy 2023-02-20 20:03:59 +07:00
parent e46fa027d7
commit 64a00bdbef
No known key found for this signature in database
GPG Key ID: 510753C31098D86C
3 changed files with 15 additions and 2 deletions

13
.github/workflows/eleventy.yaml vendored Normal file
View File

@ -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

View File

@ -1,7 +1,7 @@
const siteConfig = { const siteConfig = {
name: "rizaldy.today", name: "rizaldy.today",
repo: "https://github.com/faultables/rizaldy.today", repo: "https://github.com/faultables/rizaldy.today",
last_commit: "main", last_commit: process.env.LAST_COMMIT || "main",
author: { author: {
name: "Rizaldy", name: "Rizaldy",
avatar: "/assets/img/avatar.jpeg", avatar: "/assets/img/avatar.jpeg",

View File

@ -12,7 +12,7 @@
<li><a class="u-no-underline u-underline--hover" href="/colophon">Colophon</a></li> <li><a class="u-no-underline u-underline--hover" href="/colophon">Colophon</a></li>
<li> <li>
<a class="u-no-underline u-underline--hover" href="{{ site.repo }}/commit/{{ site.last_commit }}" <a class="u-no-underline u-underline--hover" href="{{ site.repo }}/commit/{{ site.last_commit }}"
>Source Code</a >Source Code ({{ site.last_commit }})</a
> >
</li> </li>
</ul> </ul>