add zola.yaml
Some checks failed
Deploy Zola site / build (push) Has been cancelled

This commit is contained in:
Doctor Samael 2025-10-25 14:04:23 +06:30
commit 70cbbbe1a2

View file

@ -1,59 +1,59 @@
name: Deploy Zola site
name: Deploy Zola site
env:
ZOLA_VERSION: 0.21.0
env:
ZOLA_VERSION: 0.21.0
on:
push:
on:
push:
branches:
- main
workflow_dispatch:
workflow_dispatch:
jobs:
build:
runs-on: docker
container:
image: "alpine:edge"
steps:
- name: Install CI prerequisites
run: |
apk upgrade -Ua
apk add nodejs git 'zola=~${{ env.ZOLA_VERSION }}'
- name: Clone the repository
uses: https://code.forgejo.org/actions/checkout@v5
with:
submodules: recursive
fetch-depth: 0
- name: Generate static files with Zola
run: |
zola build
- name: Upload generated files
uses: https://code.forgejo.org/actions/upload-artifact@v3
with:
name: Generated files
path: public/
deploy:
needs: [build]
runs-on: codeberg-tiny-lazy
jobs:
build:
runs-on: docker
container:
image: "alpine:edge"
steps:
- name: Install CI prerequisites
run: |
apk upgrade -Ua
apk add nodejs git 'zola=~${{ env.ZOLA_VERSION }}'
- name: Clone the repository
uses: https://code.forgejo.org/actions/checkout@v5
with:
submodules: recursive
fetch-depth: 0
- name: Checkout the target branch and clean it up
- name: Generate static files with Zola
run: |
git checkout pages || git switch --orphan pages && \
rm -Rfv $(ls -A | egrep -v '^(\.git|LICENSE)$')
- name: Download generated files
uses: https://code.forgejo.org/actions/download-artifact@v3
zola build
- name: Upload generated files
uses: https://code.forgejo.org/actions/upload-artifact@v3
with:
name: Generated files
- name: Publish the website
run: |
git config user.email codeberg-ci && \
git config user.name "Codeberg CI" && \
git add . && \
git commit --allow-empty --message " ${GITHUB_SHA}" && \
git push origin pages
path: public/
deploy:
needs: [build]
runs-on: docker
steps:
- name: Clone the repository
uses: https://code.forgejo.org/actions/checkout@v5
with:
submodules: recursive
fetch-depth: 0
- name: Checkout the target branch and clean it up
run: |
git checkout pages || git switch --orphan pages && \
rm -Rfv $(ls -A | egrep -v '^(\.git|LICENSE)$')
- name: Download generated files
uses: https://code.forgejo.org/actions/download-artifact@v3
with:
name: Generated files
- name: Publish the website
run: |
git config user.email codeberg-ci && \
git config user.name "Codeberg CI" && \
git add . && \
git commit --allow-empty --message " ${GITHUB_SHA}" && \
git push origin pages