You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
896 B
YAML
31 lines
896 B
YAML
name: Deploy
|
|
on:
|
|
workflow_dispatch: {}
|
|
push:
|
|
branches:
|
|
- main
|
|
jobs:
|
|
deploy:
|
|
if: github.repository_owner == 'ztimms73'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
- run: npm i --frozen-lockfile
|
|
- name: Build
|
|
run: npm run build
|
|
env:
|
|
NODE_OPTIONS: "--max_old_space_size=4096"
|
|
- uses: easingthemes/ssh-deploy@main
|
|
env:
|
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
ARGS: '--archive --compress --delete --exclude="/redirect.php"'
|
|
SOURCE: ".vitepress/dist/"
|
|
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
|
|
REMOTE_USER: ${{ secrets.REMOTE_USER }}
|
|
REMOTE_PORT: ${{ secrets.REMOTE_PORT }}
|
|
TARGET: ${{ secrets.REMOTE_TARGET }} |