Fixing CI
This commit is contained in:
parent
e038f17e67
commit
1dc4666411
1 changed files with 19 additions and 8 deletions
|
|
@ -1,3 +1,5 @@
|
|||
name: Build lyes.eu
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
|
|
@ -7,14 +9,19 @@ 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
|
||||
- name: install dependencies
|
||||
run: dnf install -y zola
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: build
|
||||
run: zola build
|
||||
- name: upload output
|
||||
uses: actions/upload-artifact@v6
|
||||
uses: forgejo/upload-artifact@v4
|
||||
with:
|
||||
name: output
|
||||
path: public/
|
||||
|
|
@ -25,16 +32,20 @@ jobs:
|
|||
- build
|
||||
runs-on: fedora-latest
|
||||
steps:
|
||||
- name: install dependencies
|
||||
run: |
|
||||
dnf install -y nodejs24 openssh-clients rsync
|
||||
mv /usr/bin/node-24 /usr/bin/node
|
||||
- name: download build
|
||||
uses: actions/download-artifact@v7
|
||||
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}")'
|
||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" | tr -d '\r' | ssh-add -
|
||||
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
|
||||
echo "${{ secrets.SSH_HOST_KEY }}" > ~/.ssh/known_hosts
|
||||
- name: deploy website
|
||||
run: rsync -hrvz --delete public/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:/var/data/www/lyes.eu
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue