nixin-web/.forgejo/workflows/deploy.yaml

25 lines
743 B
YAML
Raw Permalink Normal View History

2024-09-26 07:05:16 +00:00
name: "deploy to prod"
on:
push:
branches:
- prod
2024-09-26 07:28:12 +00:00
jobs:
build:
name: Build and deploy site
2024-09-26 07:05:16 +00:00
runs-on: debian-latest
steps:
2024-09-26 08:23:01 +00:00
- name: checkout repository
uses: actions/checkout@v4
- name: show what we get
run: ls -l
- name: npm ci
run: npm ci
- name: vitepress build
run: npm run docs:build
- name: add private key to ssh agent
2024-09-26 08:27:25 +00:00
uses: https://git.distrilab.fr/NixiN/ssh-agent-action@v0.9.0
2024-09-26 08:23:01 +00:00
with:
ssh-private-key: ${{ secrets.DEPLOY_SSH_PRIVATE_KEY }}
- name: do deploy
run: pushd .vitepress/dist/ ; echo "put -r *" | sftp -o StrictHostKeyChecking=no -b - -N ${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_TARGET }} ; popd