ci: upgrade hugo version to 0.133.1
All checks were successful
Deploy workflow / deploy (push) Successful in 13s
All checks were successful
Deploy workflow / deploy (push) Successful in 13s
This commit is contained in:
parent
b9a43b78b1
commit
0f79ca8b76
1 changed files with 32 additions and 12 deletions
|
@ -1,41 +1,61 @@
|
||||||
on: [push]
|
name: Deploy workflow
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
- develop
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
deploy:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
# by default it runs on a node.js debian image
|
|
||||||
container:
|
container:
|
||||||
image: code.forgejo.org/oci/node:20-bookworm
|
image: code.forgejo.org/oci/node:20-bookworm
|
||||||
steps:
|
steps:
|
||||||
|
- name: Set baseURL
|
||||||
|
shell: /bin/bash
|
||||||
|
run: |
|
||||||
|
if [[ "${{ env.github_ref_name }}" == "master" ]]; then
|
||||||
|
echo "Using master config"
|
||||||
|
echo -n "https://bicycleure.fr" > /base_url.txt
|
||||||
|
fi
|
||||||
|
if [[ "${{ env.github_ref_name }}" == "develop" ]]; then
|
||||||
|
echo "Using develop config"
|
||||||
|
echo -n "https://develop.bicycleure.fr" > /base_url.txt
|
||||||
|
fi
|
||||||
|
ls /
|
||||||
|
cat /base_url.txt
|
||||||
- name: Install rsync
|
- name: Install rsync
|
||||||
run: apt update && apt install -y rsync
|
run: apt update && apt install -y rsync
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: true
|
submodules: true
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- run: ls -la
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
env:
|
env:
|
||||||
HUGO_RELEASE_TYPE: extended
|
HUGO_RELEASE_TYPE: extended
|
||||||
HUGO_VERSION: 0.120.3
|
HUGO_VERSION: 0.133.1
|
||||||
run: |
|
run: |
|
||||||
mkdir ~/hugo
|
mkdir ~/hugo
|
||||||
cd ~/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
|
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
|
tar -xvzf hugo.tar.gz
|
||||||
mv hugo /usr/local/bin
|
mv hugo /usr/local/bin
|
||||||
- name: Build
|
- name: Build
|
||||||
run: hugo --minify
|
run: |
|
||||||
|
hugo --baseURL="$(cat /base_url.txt)"
|
||||||
- name: Create Key File
|
- name: Create Key File
|
||||||
run: install -m 600 -D /dev/null ~/.ssh/id_edsa
|
run: install -m 600 -D /dev/null ~/.ssh/id_edsa
|
||||||
- name: Populate Key
|
- name: Populate Key
|
||||||
run: echo "${{ secrets.SRV06_DEPLOY_WEBSITE_SSH_KEY }}" > ~/.ssh/id_edsa
|
run: echo "${{ secrets.SRV06_DEPLOY_WEBSITE_SSH_KEY }}" > ~/.ssh/id_edsa
|
||||||
- name: Upload
|
- name: Upload
|
||||||
env:
|
env:
|
||||||
OUTPUT_PATH: /warmd/mbess/bicycleure/website_prod
|
OUTPUT_PATH: "/warmd/mbess/bicycleure/website_prod"
|
||||||
REMOTE_USER: forgejo_actions_websites
|
REMOTE_USER: forgejo_actions_websites
|
||||||
SRV_HOST: srv06.lefuturiste.fr
|
SRV_HOST: srv06.lefuturiste.fr
|
||||||
run: |
|
run: |
|
||||||
rsync --perms --archive --stats \
|
rsync -r --stats --compress \
|
||||||
-e 'ssh -i ~/.ssh/id_edsa -o StrictHostKeyChecking=no' ./public \
|
-e 'ssh -i ~/.ssh/id_edsa -o StrictHostKeyChecking=no' ./public \
|
||||||
${REMOTE_USER}@${SRV_HOST}:${OUTPUT_PATH}
|
$REMOTE_USER@$SRV_HOST:$OUTPUT_PATH$GITHUB_REF_NAME
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue