Skip to content

CI

CI #97

Workflow file for this run

# This is a basic workflow to help you get started with Actions
name: CI
# 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 ]
pull_request:
branches: [ main ]
repository_dispatch:
types:
- webhook-1
# 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"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# 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
- name: use Node.js 16
uses: actions/setup-node@v1
with:
node-version: 16
- run: npm install -g yarn
# Runs a single command using the runners shell
- name: install
run: |
yarn --version
yarn install
# Runs a set of commands using the runners shell
- name: Run build
run: |
export ALGOLIA=${{ secrets.ALGOLIA }}
npm run "docs:build"
echo $ALGOLIA
env:
CI: true
- name: ssh deploy
# You may pin to the exact commit or the version.
# uses: easingthemes/ssh-deploy@c711f2c3391cac2876bf4c833590077f02e4bcb8
uses: easingthemes/ssh-deploy@v2.2.11
with:
# Private Key
SSH_PRIVATE_KEY: ${{ secrets.TOKEN }}
# Remote host
REMOTE_HOST: 1.117.74.21
# Remote user
REMOTE_USER: root
# Remote port
# REMOTE_PORT: # optional, default is 22
# Source directory
SOURCE: docs/.vitepress/dist # optional, default is
# Target directory
TARGET: /home/vitepress-blog/ # optional, default is /home/
# Arguments to pass to rsync
# ARGS: # optional, default is -rltgoDzvO
# An array of folder to exclude
# EXCLUDE: # optional, default is