docs(linux): fail2ban notes #285
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Vuepress | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [15] | |
steps: | |
- name: Checkout 🛎️ | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Pnpm Action 🛎️ | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 7 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
- name: Install and Build 🔧 | |
env: | |
TZ: Asia/Shanghai | |
run: | | |
export GOOGLE_GA=${{ secrets.GOOGLE_GA }} GOOGLE_SEARCH_CONSOLE=${{ secrets.GOOGLE_SEARCH_CONSOLE }} | |
git --no-pager log --oneline -n 20 | |
pnpm install | |
pnpm docs:build | |
- name: Deploy Github 🚀 | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.PAGES_TOKEN }} | |
publish_dir: docs/.vuepress/dist | |
cname: docs.shanyuhai.top | |
commit_message: ${{ github.event.head_commit.message }} | |
- name: Deploy Server 🚀 | |
uses: burnett01/[email protected] | |
with: | |
switches: -avzr --delete | |
path: docs/.vuepress/dist/ | |
remote_path: ${{ secrets.SERVER_TARGET }} | |
remote_host: ${{ secrets.SERVER_IP }} | |
remote_port: ${{ secrets.SERVER_PORT }} | |
remote_user: ${{ secrets.SSH_USERNAME }} | |
remote_key: ${{ secrets.SSH_PRIVATE_KEY }} |