Update for modern hugo, deploy on gitea
All checks were successful
Deploy / deploy (push) Successful in 12s
All checks were successful
Deploy / deploy (push) Successful in 12s
This commit is contained in:
42
.gitea/workflows/deploy.yaml
Normal file
42
.gitea/workflows/deploy.yaml
Normal file
@ -0,0 +1,42 @@
|
||||
name: Deploy
|
||||
run-name: ${{ gitea.actor }} is deploying ${{ gitea.repository }}
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: docker.gitea.com/runner-images:ubuntu-latest
|
||||
volumes:
|
||||
- /opt/hugo/ally.id:/opt/hugo/ally.id
|
||||
env:
|
||||
DART_SASS_VERSION: 1.98.0
|
||||
steps:
|
||||
- name: Check out repo
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
submodules: 'true'
|
||||
|
||||
- name: Install Hugo
|
||||
uses: peaceiris/actions-hugo@v3
|
||||
with:
|
||||
hugo-version: '0.157.0'
|
||||
extended: true
|
||||
|
||||
- name: Install Dart Sass
|
||||
run: |
|
||||
curl -LJO https://github.com/sass/dart-sass/releases/download/${DART_SASS_VERSION}/dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz \
|
||||
&& tar -xf dart-sass-${DART_SASS_VERSION}-linux-x64.tar.gz \
|
||||
&& cp -r dart-sass/* /usr/local/bin \
|
||||
&& rm -rf dart-sass* \
|
||||
&& sass --embedded --version
|
||||
|
||||
- name: Build site
|
||||
run: |
|
||||
hugo build --gc --minify --baseURL https://ally.id --destination /opt/hugo/ally.id
|
||||
|
||||
- name: Set permissions
|
||||
run: chown -R www-data:www-data /opt/hugo/ally.id
|
||||
@ -2,7 +2,9 @@ baseURL = "https://ally.id/"
|
||||
languageCode = "en-us"
|
||||
title = "ally"
|
||||
theme= "ally"
|
||||
paginatePath = ""
|
||||
|
||||
[pagination]
|
||||
path = ""
|
||||
|
||||
[permalinks]
|
||||
news = "/:year/:month/:day/:slug/"
|
||||
|
||||
@ -3,19 +3,19 @@
|
||||
<nav class="paginator" aria-label="page">
|
||||
<ul class="pagination pagination-sm">
|
||||
<li class="page-item{{ if not $paginator.HasPrev }} disabled{{ end }}">
|
||||
<a class="page-link"{{ if $paginator.HasPrev }} href="{{ $paginator.Prev.URL }}"{{ end }}><svg width="20" height="16"><path fill="none" stroke="currentColor" stroke-width="3" d="M 20 0 l -6 8 l 6 8" /></svg> Previous</a>
|
||||
<a class="page-link"{{ if $paginator.HasPrev }} href="{{ replace $paginator.Prev.URL "//" "/" }}"{{ end }}><svg width="20" height="16"><path fill="none" stroke="currentColor" stroke-width="3" d="M 20 0 l -6 8 l 6 8" /></svg> Previous</a>
|
||||
</li>
|
||||
{{ if lt $paginator.TotalPages 10 }}
|
||||
{{ range $paginator.Pagers }}
|
||||
<li class="page-item{{ if eq . $paginator}} active{{ end }}">
|
||||
<a class="page-link" href="{{ .URL }}">{{ .PageNumber }}{{ if eq . $paginator}}<span class="sr-only"></span>{{ end }}</a>
|
||||
<a class="page-link" href="{{ replace .URL "//" "/" }}">{{ .PageNumber }}{{ if eq . $paginator}}<span class="sr-only"></span>{{ end }}</a>
|
||||
</li>
|
||||
{{ end }}
|
||||
{{ else }}
|
||||
<li class="page-item too-many">Page {{ $paginator.PageNumber }} of {{ $paginator.TotalPages }}</li>
|
||||
{{ end }}
|
||||
<li class="page-item{{ if not $paginator.HasNext }} disabled{{ end }}">
|
||||
<a class="page-link"{{ if $paginator.HasNext }} href="{{ $paginator.Next.URL }}"{{ end }}>Next <svg width="20" height="16"><path fill="none" stroke="currentColor" stroke-width="3" d="M 0 0 l 6 8 l -6 8" /></svg></a>
|
||||
<a class="page-link"{{ if $paginator.HasNext }} href="{{ replace $paginator.Next.URL "//" "/" }}"{{ end }}>Next <svg width="20" height="16"><path fill="none" stroke="currentColor" stroke-width="3" d="M 0 0 l 6 8 l -6 8" /></svg></a>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
Reference in New Issue
Block a user