Fix issues with workflow syntax
All checks were successful
Build and Deploy Hugo / deploy (push) Successful in -16m23s
All checks were successful
Build and Deploy Hugo / deploy (push) Successful in -16m23s
This commit is contained in:
parent
97e9313436
commit
ededbf5cfa
3 changed files with 27 additions and 6 deletions
|
@ -16,13 +16,34 @@ jobs:
|
||||||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
||||||
|
|
||||||
- name: Setup Hugo
|
- name: Setup Hugo
|
||||||
uses: peaceiris/actions-hugo@v3
|
run: |
|
||||||
with:
|
wget https://github.com/gohugoio/hugo/releases/download/v0.147.8/hugo_0.147.8_linux-amd64.tar.gz
|
||||||
hugo-version: "0.119.0"
|
tar -xzf hugo_0.147.8_linux-amd64.tar.gz
|
||||||
# extended: true
|
chmod +x hugo
|
||||||
|
mkdir -p ~/bin
|
||||||
|
mv hugo ~/bin/
|
||||||
|
echo "~/bin" >> $GITHUB_PATH
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: hugo --minify
|
run: hugo --minify
|
||||||
|
|
||||||
|
- name: Setup SSH
|
||||||
|
run: |
|
||||||
|
echo "Setting up SSH..."
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
if [ -z "${{ secrets.SSH_PRIVATE_KEY }}" ]; then
|
||||||
|
echo "ERROR: SSH_PRIVATE_KEY secret is not set!"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
echo "SSH_PRIVATE_KEY secret is present"
|
||||||
|
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_rsa
|
||||||
|
chmod 600 ~/.ssh/id_rsa
|
||||||
|
chmod 700 ~/.ssh
|
||||||
|
echo "SSH key saved and permissions set" ssh-keyscan -H alexselimov.com >> ~/.ssh/known_hosts
|
||||||
|
echo "Host key added to known_hosts"
|
||||||
|
# Test SSH connection
|
||||||
|
echo "Testing SSH connection..."
|
||||||
|
ssh -o StrictHostKeyChecking=no -o BatchMode=yes root@alexselimov.com "echo 'SSH connection successful'" || echo "SSH connection failed"
|
||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
run: rsync -azvr public/* root@smokey:/var/www/alexselimov.com/
|
run: rsync -azvr public/* root@alexselimov.com:/var/www/alexselimov.com/
|
||||||
|
|
2
.gitmodules
vendored
2
.gitmodules
vendored
|
@ -1,3 +1,3 @@
|
||||||
[submodule "themes/hugo-theme-terminal"]
|
[submodule "themes/hugo-theme-terminal"]
|
||||||
path = themes/hugo-theme-terminal
|
path = themes/hugo-theme-terminal
|
||||||
url = https://github.com/panr/hugo-theme-terminal.git
|
url = https://forge.alexselimov.com/aselimov/Terminal-Hugo-Theme.git
|
||||||
|
|
0
.hugo_build.lock
Normal file
0
.hugo_build.lock
Normal file
Loading…
Add table
Add a link
Reference in a new issue