51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
name: Build lyes.eu
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: fedora-latest
|
|
steps:
|
|
- name: install dependencies
|
|
run: |
|
|
dnf install -y --nogpgcheck --repofrompath 'terra,https://repos.fyralabs.com/terra$releasever' terra-release
|
|
dnf install -y zola nodejs24 git
|
|
mv /usr/bin/node-24 /usr/bin/node
|
|
- name: checkout code
|
|
uses: actions/checkout@v6
|
|
with:
|
|
submodules: recursive
|
|
- name: build
|
|
run: zola build
|
|
- name: upload output
|
|
uses: forgejo/upload-artifact@v4
|
|
with:
|
|
name: output
|
|
path: public/
|
|
if-no-files-found: error
|
|
include-hidden-files: true
|
|
deploy:
|
|
needs:
|
|
- build
|
|
runs-on: fedora-latest
|
|
steps:
|
|
- name: install dependencies
|
|
run: |
|
|
dnf install -y nodejs24
|
|
mv /usr/bin/node-24 /usr/bin/node
|
|
- name: download build
|
|
uses: forgejo/download-artifact@v4
|
|
with:
|
|
name: output
|
|
path: public/
|
|
- name: preparing secrets
|
|
run: |
|
|
eval $(ssh-agent -s)
|
|
bash -c 'ssh-add <(echo "${SSH_PRIVATE_KEY}")'
|
|
mkdir -p ~/.ssh
|
|
echo "${SSH_HOST_KEY}" > ~/.ssh/known_hosts
|
|
# - name: sending the files
|
|
# run: rsync -hrvz --delete public/ ${SSH_USER}@${SSH_HOST}:/var/data/www/lyes.eu
|