fix: change deploy workflow again to not use container
Some checks failed
Deploy Blog / deploy (push) Failing after 1m21s
Some checks failed
Deploy Blog / deploy (push) Failing after 1m21s
This commit is contained in:
parent
55fe835270
commit
2233c02398
1 changed files with 36 additions and 5 deletions
|
@ -17,6 +17,25 @@
|
|||
# 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
|
||||
on:
|
||||
push:
|
||||
|
@ -25,13 +44,25 @@ on:
|
|||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: node:18
|
||||
volumes:
|
||||
- /var/www:/var/www
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: "18"
|
||||
cache: "npm"
|
||||
|
||||
- run: npm install
|
||||
- run: npm run build:posts
|
||||
- run: npm run build
|
||||
- run: cp -r dist/* /var/www/systemsobscure.blog/
|
||||
|
||||
- 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
|
||||
|
|
Loading…
Add table
Reference in a new issue