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