website/.forgejo/workflows/build.yml
2024-10-17 12:06:17 -04:00

23 lines
No EOL
762 B
YAML

on: [push]
jobs:
build:
runs-on: docker
container.image: node:20-bookworm
steps:
- uses: actions/checkout@v4
- run: npm install && npm run build
name: NPM Install and Build
- name: Setup SSH Key
run: |
mkdir -p ~/.ssh/
echo "${{ secrets.SSHKEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
- name: Push site to nginx
run: |
apt update && apt install -y rsync
rsync -avc -e "ssh -o StrictHostKeyChecking=no" --delete .vercel/output/static/* ${{secrets.USER}}@${{secrets.HOSTNAME}}:${{secrets.DESTPATH}}/.
- name: Upload output
uses: actions/upload-artifact@v3
with:
name: outputsite
path: .vercel/output/static