2024-03-09 17:10:03 +00:00
|
|
|
name: Deploy website to alys.phundrak.com
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: deploy
|
|
|
|
cancel-in-progress: false
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
- name: Setup Node
|
|
|
|
uses: actions/setup-node@v4
|
|
|
|
with:
|
2024-06-27 05:56:08 +00:00
|
|
|
node-version: 20.x
|
2024-03-09 17:10:03 +00:00
|
|
|
- name: Install dependencies
|
2024-06-27 05:56:08 +00:00
|
|
|
run: npm ci
|
2024-03-09 17:10:03 +00:00
|
|
|
- name: Build with VitePress
|
2024-06-27 05:56:08 +00:00
|
|
|
run: npm run build
|
2024-03-09 17:10:03 +00:00
|
|
|
- name: Deploy on the web
|
|
|
|
uses: appleboy/scp-action@v0.1.7
|
|
|
|
with:
|
|
|
|
host: ${{ secrets.HOST }}
|
|
|
|
username: ${{ secrets.USERNAME }}
|
|
|
|
key: ${{ secrets.KEY }}
|
|
|
|
port: ${{ secrets.PORT }}
|
|
|
|
source: docs/.vitepress/dist/*
|
|
|
|
target: ${{ secrets.DESTPATH }}
|
|
|
|
strip_components: 3
|