parent
fa2bbfbbfb
commit
4ea374b31a
2 changed files with 41 additions and 7 deletions
|
@ -9,20 +9,22 @@ jobs:
|
|||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
- name: Add key
|
||||
run: |
|
||||
mkdir $HOME/.ssh && \
|
||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > $HOME/.ssh/id_rsa
|
||||
- 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.4/hugo_extended_0.123.4_linux-amd64.tar.gz && \
|
||||
tar -xzvf hugo_extended_0.123.4_linux-amd64.tar.gz && \
|
||||
wget https://github.com/gohugoio/hugo/releases/download/v0.123.4/hugo_0.123.4_linux-amd64.tar.gz && \
|
||||
tar -xzvf hugo_0.123.4_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
|
||||
# run: rsync -avz --delete public/ ${{ vars.REMOTE_USER }}@${{ vars.REMOTE_HOST }}:${{ vars.REMOTE_TARGET }}
|
||||
uses: easingthemes/ssh-deploy@main
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
32
.gitea/workflows/build.yaml
Normal file
32
.gitea/workflows/build.yaml
Normal file
|
@ -0,0 +1,32 @@
|
|||
# name: Hugo
|
||||
|
||||
# on: [push]
|
||||
|
||||
# jobs:
|
||||
# build:
|
||||
|
||||
# runs-on: ubuntu-22.04
|
||||
|
||||
# steps:
|
||||
# - uses: actions/checkout@v3
|
||||
# with:
|
||||
# fetch-depth: 0
|
||||
# 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.4/hugo_extended_0.123.4_linux-amd64.tar.gz && \
|
||||
# tar -xzvf hugo_extended_0.123.4_linux-amd64.tar.gz && \
|
||||
# chmod +x hugo
|
||||
# - name: Run build task
|
||||
# run: ./hugo --minify --logLevel info
|
||||
# - name: Deploy to Server
|
||||
# uses: easingthemes/ssh-deploy@main
|
||||
# env:
|
||||
# SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
# ARGS: "-rlgoDzvc -i --delete"
|
||||
# SOURCE: "public/"
|
||||
# REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
|
||||
# REMOTE_USER: ${{ secrets.REMOTE_USER }}
|
||||
# TARGET: ${{ secrets.REMOTE_TARGET }}
|
Loading…
Add table
Reference in a new issue