parent
600679557e
commit
6ab03b4e00
1 changed files with 18 additions and 22 deletions
|
@ -1,30 +1,26 @@
|
|||
name: Hugo
|
||||
ame: Hugo
|
||||
|
||||
on: [push]
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
runs-on: hugo-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: Grab packages
|
||||
run: |
|
||||
apt-get update && \
|
||||
apt-get install -y jq rsync tar wget && \
|
||||
wget https://github.com/gohugoio/hugo/releases/download/v0.123.6/hugo_extended_0.123.6_linux-amd64.tar.gz && \
|
||||
tar -xzvf hugo_extended_0.123.6_linux-amd64.tar.gz && \
|
||||
chmod +x hugo
|
||||
- name: Run build task
|
||||
run: ./hugo --minify --logLevel info
|
||||
- name: Test static page
|
||||
run: bash ${{ gitea.workspace }}/bin/test_static_page.sh
|
||||
- name: Deploy to Server
|
||||
uses: easingthemes/ssh-deploy@main
|
||||
env:
|
||||
- name: Grab packages
|
||||
run: apk add rsync openssh-client
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: 'recursive'
|
||||
- name: Run build task
|
||||
run: hugo --minify
|
||||
- name: Test static page
|
||||
run: bash ${{ gitea.workspace }}/bin/test_static_page.sh
|
||||
- name: Deploy to Server
|
||||
uses: easingthemes/ssh-deploy@main
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
ARGS: "-rlgoDzvc -i --delete"
|
||||
SOURCE: "public/"
|
||||
|
|
Loading…
Add table
Reference in a new issue