2024-10-05 12:25:41 +02:00
|
|
|
name: publish
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2024-10-06 19:47:46 +02:00
|
|
|
- test
|
2024-10-05 12:25:41 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
publish:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
# env:
|
|
|
|
# SSH_PRIVATE_KEY: ${{ secrets.SOME_SECRET_THAT_REPRESENTS_THE_PRIVATE_KEY }}
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
|
|
|
with:
|
|
|
|
submodules: recursive
|
|
|
|
|
|
|
|
- uses: actions/setup-node@v4
|
|
|
|
with:
|
2024-10-06 19:47:46 +02:00
|
|
|
node-version: 'lts/*'
|
2024-10-05 12:25:41 +02:00
|
|
|
|
|
|
|
- run: npm ci
|
|
|
|
|
|
|
|
- run: npm run build
|
|
|
|
|
|
|
|
- uses: actions/upload-artifact@v4
|
|
|
|
with:
|
|
|
|
path: _site
|
|
|
|
|
|
|
|
# - name: Deploy
|
|
|
|
# run: |
|
|
|
|
# eval $(ssh-agent -s)
|
|
|
|
# echo "$SSH_PRIVATE_KEY" | ssh-add -
|
|
|
|
# apt update && apt install -y rsync
|
|
|
|
# mkdir ~/.ssh
|
|
|
|
# ssh-keyscan your-host.com > ~/.ssh/known_hosts
|
|
|
|
# rsync -atv --progress ./public/ your-user@your-host.com:/home/your-user/your-content-directory/public
|