This commit is contained in:
parent
a8e2de3a3c
commit
fd7871b8a7
1 changed files with 27 additions and 47 deletions
|
@ -1,41 +1,3 @@
|
||||||
# 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/
|
|
||||||
#
|
|
||||||
|
|
||||||
# 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/
|
|
||||||
|
|
||||||
name: Deploy Blog
|
name: Deploy Blog
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
@ -44,18 +6,36 @@ on:
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: node:18
|
container:
|
||||||
|
image: node:18
|
||||||
|
volumes:
|
||||||
|
- /var/www/systemsobscure.blog:/output
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- run: npm install
|
- run: npm install
|
||||||
- run: npm run build:posts
|
- run: npm run build:posts
|
||||||
- run: npm run build
|
- run: npm run build
|
||||||
|
- name: Deploy files
|
||||||
- name: Deploy via SSH
|
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.SSH_PRIVATE_KEY }}" > /tmp/ssh_key
|
rm -rf /output/*
|
||||||
chmod 600 /tmp/ssh_key
|
cp -r dist/* /output/
|
||||||
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no thomas@localhost "rm -rf /var/www/systemsobscure.blog/*"
|
|
||||||
scp -i /tmp/ssh_key -o StrictHostKeyChecking=no -r dist/* thomas@localhost:/var/www/systemsobscure.blog/
|
# jobs:
|
||||||
rm /tmp/ssh_key
|
# 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
|
||||||
|
|
||||||
|
# - name: Deploy via SSH
|
||||||
|
# run: |
|
||||||
|
# echo "${{ secrets.SSH_PRIVATE_KEY }}" > /tmp/ssh_key
|
||||||
|
# chmod 600 /tmp/ssh_key
|
||||||
|
# ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no thomas@localhost "rm -rf /var/www/systemsobscure.blog/*"
|
||||||
|
# scp -i /tmp/ssh_key -o StrictHostKeyChecking=no -r dist/* thomas@localhost:/var/www/systemsobscure.blog/
|
||||||
|
# rm /tmp/ssh_key
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue