2025-07-08 16:45:18 +01:00
|
|
|
# name: Deploy site
|
|
|
|
# on:
|
|
|
|
# push:
|
|
|
|
# branches: [main]
|
|
|
|
|
|
|
|
# jobs:
|
|
|
|
# deploy:
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
# container: node:18
|
|
|
|
# steps:
|
|
|
|
# - uses: actions/checkout@v3
|
|
|
|
# - run: npm install
|
|
|
|
# - run: npm run build:posts
|
|
|
|
# - run: npm run build
|
|
|
|
# - run: |
|
|
|
|
# cp -r dist/* /var/www/systemsobscure.blog/
|
|
|
|
# chown -R www-data:www-data /var/www/systemsobscure.blog/
|
|
|
|
#
|
|
|
|
|
2025-07-08 16:52:21 +01:00
|
|
|
# name: Deploy Blog
|
|
|
|
# on:
|
|
|
|
# push:
|
|
|
|
# branches: [main]
|
|
|
|
|
|
|
|
# jobs:
|
|
|
|
# deploy:
|
|
|
|
# runs-on: ubuntu-latest
|
|
|
|
# container:
|
|
|
|
# image: node:18
|
|
|
|
# volumes:
|
|
|
|
# - /var/www:/var/www
|
|
|
|
# steps:
|
|
|
|
# - uses: actions/checkout@v3
|
|
|
|
# - run: npm install
|
|
|
|
# - run: npm run build:posts
|
|
|
|
# - run: npm run build
|
|
|
|
# - run: cp -r dist/* /var/www/systemsobscure.blog/
|
|
|
|
|
2025-07-08 16:45:18 +01:00
|
|
|
name: Deploy Blog
|
2025-07-08 15:56:42 +01:00
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches: [main]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2025-07-08 16:52:21 +01:00
|
|
|
|
|
|
|
- name: Setup Node.js
|
|
|
|
uses: actions/setup-node@v3
|
|
|
|
with:
|
|
|
|
node-version: "18"
|
|
|
|
cache: "npm"
|
|
|
|
|
2025-07-08 15:56:42 +01:00
|
|
|
- run: npm install
|
|
|
|
- run: npm run build:posts
|
|
|
|
- run: npm run build
|
2025-07-08 16:52:21 +01:00
|
|
|
|
|
|
|
- name: Copy files via SCP
|
|
|
|
uses: appleboy/scp-action@v0.1.4
|
|
|
|
with:
|
|
|
|
host: localhost
|
|
|
|
username: thomas
|
|
|
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
|
|
source: "dist/*"
|
|
|
|
target: "/var/www/systemsobscure.blog/"
|
|
|
|
strip_components: 1
|