revert: 93d1d68e60d4e5099a0505fa567f6cbc91b8829d #91
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 | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
deploy: | |
name: Build & Deploy | |
runs-on: ubuntu-latest | |
timeout-minutes: 10 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('patches/**') }} | |
- name: Use Node.js 16 | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
cache: yarn | |
- name: Install Dependencies | |
run: yarn install | |
- name: Build Site | |
run: yarn build | |
env: | |
VITE_BAOSHUO_CDNJS: true | |
- name: Deploy site to server (Tokyo, JP) | |
uses: easingthemes/[email protected] | |
env: | |
ARGS: '-avz --delete' | |
SOURCE: dist/ | |
REMOTE_HOST: ${{ secrets.REMOTE_HOST }} | |
REMOTE_USER: ${{ secrets.REMOTE_USER }} | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
TARGET: ${{ secrets.REMOTE_PATH }} | |
EXCLUDE: .git,.github,.gitlab-ci.yml,.nojekyll | |
- name: Deploy site to server (Hong Kong, CN) | |
uses: easingthemes/[email protected] | |
env: | |
ARGS: '-avz --delete' | |
SOURCE: dist/ | |
REMOTE_HOST: ${{ secrets.REMOTE_HOST_2 }} | |
REMOTE_USER: ${{ secrets.REMOTE_USER }} | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
TARGET: ${{ secrets.REMOTE_PATH }} | |
EXCLUDE: .git,.github,.gitlab-ci.yml,.nojekyll |