hugo-sandbox-01/.forgejo/workflows/hugo.yaml

32 lines
1.2 KiB
YAML
Raw Normal View History

2023-10-23 23:34:16 +00:00
on: [push]
jobs:
test:
runs-on: docker
2023-11-06 16:28:31 +00:00
# by default it runs on a node.js debian image
2023-10-23 23:34:16 +00:00
steps:
2023-11-06 16:28:31 +00:00
- name: Apt update and install
2023-11-06 16:29:58 +00:00
run: apt update && apt install -y rsync curl
2023-10-23 23:34:16 +00:00
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- run: ls -la
- name: Setup Hugo
2023-11-06 16:21:37 +00:00
env:
2023-11-06 16:42:28 +00:00
HUGO_RELEASE_TYPE: extended
HUGO_VERSION: 0.120.3
2023-11-06 16:21:37 +00:00
run: |
mkdir ~/hugo
cd ~/hugo
2023-11-06 16:42:28 +00:00
curl -L "https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_RELEASE_TYPE}_${HUGO_VERSION}_Linux-64bit.tar.gz" --output hugo.tar.gz
2023-11-06 16:21:37 +00:00
tar -xvzf hugo.tar.gz
2023-11-06 16:23:40 +00:00
mv hugo /usr/local/bin
2023-10-23 23:34:16 +00:00
- name: Build
run: hugo --minify
2023-11-06 16:21:37 +00:00
- name: Create Key File
run: install -m 600 -D /dev/null ~/.ssh/id_edsa
- name: Populate Key
run: echo "${{ secrets.SRV06_DEPLOY_WEBSITE_SSH_KEY }}" > ~/.ssh/id_edsa
- name: Upload
2024-02-09 17:10:59 +00:00
run: rsync --archive --stats -e 'ssh -i ~/.ssh/id_edsa -o StrictHostKeyChecking=no' public/ forgejo_actions_websites@srv06.lefuturiste.fr:/warmd/mbess/websites/hugo-sandbox-01/public