deploy action
This commit is contained in:
parent
717d789329
commit
6f0f6d2c32
1 changed files with 33 additions and 0 deletions
33
gitea/workflows/deploy.yaml
Normal file
33
gitea/workflows/deploy.yaml
Normal file
|
@ -0,0 +1,33 @@
|
|||
name: Hugo
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- 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_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: 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