Skip to content

Commit

Permalink
add runner
Browse files Browse the repository at this point in the history
  • Loading branch information
itspacchu committed Mar 16, 2022
1 parent ca3d474 commit cf8163c
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/runner.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
#https://github.com/itspacchu/pacblog/blob/master/.github/workflows/runner.yaml
on:
push:
branches:
- production

jobs:
UpdateServer:
runs-on: self-hosted

steps:
- name: stash local changes before
run: cd /home/ubuntu/MjcetWiki && git stash

- name: pull new changes from github
run: cd /home/ubuntu/MjcetWiki/ && git checkout production && git pull origin production


GenerateHtmlFiles:
runs-on: self-hosted
needs: [UpdateServer]
steps:
- name: run the updater script
run: cd /home/ubuntu/MjcetWiki/ && hugo

RestartNginx:
runs-on: self-hosted
needs: GenerateHtmlFiles

steps:
- name: restart nginx server
run: sudo systemctl restart nginx

0 comments on commit cf8163c

Please sign in to comment.