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

35 lines
1.2 KiB
YAML
Raw Permalink Normal View History

2024-02-09 16:04:27 +00:00
on: [push]
jobs:
test:
runs-on: docker
# by default it runs on a node.js debian image
steps:
- name: Apt update and install
run: apt update && apt install -y rsync curl
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- run: ls -la
- name: Setup Hugo
env:
HUGO_RELEASE_TYPE: extended
HUGO_VERSION: 0.120.3
run: |
mkdir ~/hugo
cd ~/hugo
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
tar -xvzf hugo.tar.gz
mv hugo /usr/local/bin
- name: Build
run: hugo --minify
2024-02-09 17:28:54 +00:00
- name: Create key file
run: install -m 600 -D /dev/null ~/.ssh/id
2024-02-09 16:04:27 +00:00
- name: Populate Key
2024-02-09 17:28:54 +00:00
run: echo "${{ secrets.SRV06_DEPLOY_WEBSITE_SSH_KEY }}" > ~/.ssh/id
2024-02-09 16:04:27 +00:00
- name: Upload
2024-02-09 17:28:54 +00:00
run: |
2024-02-09 18:30:48 +00:00
rsync --stats --recursive \
2024-02-09 17:28:54 +00:00
--rsh='ssh -i ~/.ssh/id -o StrictHostKeyChecking=no' \
public/ forgejo_actions_websites@srv06.lefuturiste.fr:/warmd/mbess/websites/hugo-sandbox-02/public