Skip to content

Workflow file for this run

name: SSH Server Deploy
on:
push:
branches: json-server
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node.js environment
uses: actions/setup-node@v4
with:
node-version: 20.x
- name: build
run: |
npm i pnpm -g
pnpm i
pnpm run gen:sw
pnpm run build:index
cp ./dist/html/index.html ./dist/html/404.html
- name: deploy to github pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GIT_HUB_TOKEN }}
publish_dir: ./dist/html
publish_branch: gh-pages
# - name: SSH Server Deploy
# uses: kostya-ten/ssh-server-deploy@v4
# with:
# host: ${{ secrets.SSH_HOST }}
# port: 22
# username: ${{ secrets.SSH_USER }}
# password: ${{ secrets.SSH_PASSWORD }}
# scp_source: ./dist/*
# scp_target: /var/www/yszm/
# after_script: |
# whoami