2022-04-05 17:36:21 +00:00
|
|
|
name: CI & Deploy
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
submodules: true # Fetch Hugo themes (true OR recursive)
|
|
|
|
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod
|
|
|
|
|
|
|
|
- name: Setup Hugo
|
|
|
|
uses: peaceiris/actions-hugo@v2
|
|
|
|
with:
|
|
|
|
hugo-version: 'latest'
|
|
|
|
|
|
|
|
- name: Build
|
|
|
|
run: hugo --minify
|
|
|
|
|
|
|
|
- name: RSync Deploy
|
|
|
|
uses: burnett01/rsync-deployments@5.2
|
|
|
|
with:
|
|
|
|
switches: -avzr --delete
|
|
|
|
path: ./public
|
|
|
|
remote_path: ${{ secrets.DEPLOY_PATH }}
|
|
|
|
remote_host: ${{ secrets.DEPLOY_HOST }}
|
|
|
|
remote_port: ${{ secrets.DEPLOY_PORT }}
|
|
|
|
remote_user: ${{ secrets.DEPLOY_USER }}
|
2022-12-02 00:17:43 +00:00
|
|
|
remote_key: ${{ secrets.DEPLOY_KEY }}
|