Ekapp/.github/workflows/main.yml

36 lines
918 B
YAML
Raw Normal View History

2020-08-05 12:08:59 +00:00
name: CD
on:
push:
branches: [ production ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
token: a0a2dd521e6af856629d95da2a32f196957a78b0
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: '12.x'
2020-08-05 12:11:15 +00:00
- run: cd skolehjem
2020-08-05 12:08:59 +00:00
- run: npm install
- run: npm run production
- name: Commit built assets
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git checkout -B deploy
git add -f public/
git commit -m "Build front-end assets"
git push -f origin deploy
- name: Deploy to production
uses: appleboy/ssh-action@master
with:
username: ekapp
host: sebathefox.dk
password: Aa123456&
script: 'cd /home/ekapp/public_html/skolehjem && ./server_deploy.sh'