Skip to content

style: update config.toml #253

style: update config.toml

style: update config.toml #253

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: github pages
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the main branch
push:
branches: [ main ]
paths-ignore:
- '.gitignore'
- 'README.md'
pull_request:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
# Runs a single command using the runners shell
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.97.0'
extended: true
- name: Build
run: hugo --minify
# Runs a set of commands using the runners shell
- name: Github Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
with:
github_token: ${{ secrets.ACCESS_TOKEN }}
publish_dir: ./public
# Deploy to Server
- name: Server
uses: easingthemes/ssh-deploy@main
env:
# 注意: cd .ssh/;cat id_rsa.pub >> authorized_keys
SSH_PRIVATE_KEY: ${{ secrets.SERVER_SSH_KEY }}
ARGS: "-rltgoDzvO --delete"
SOURCE: "public/"
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
TARGET: ${{ secrets.REMOTE_TARGET }}