-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (43 loc) · 1.13 KB
/
codeshipper.yml
File metadata and controls
50 lines (43 loc) · 1.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: Codeshipper
on:
push:
branches:
# Run only on pushes to main
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install dependencies
run: npm install
- name: Run build step
run: npm run build
- name: Commit changes
uses: EndBug/add-and-commit@v5
with:
message: "[Automated] Update build files"
add: "style* assets/css"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy:
needs: build
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Deploy
uses: appleboy/ssh-action@v0.1.2
with:
host: ${{secrets.SSH_HOST}}
key: ${{secrets.SSH_KEY}}
username: ${{secrets.SSH_USER}}
script: |
cd ${{secrets.DESTINATION_DIR}}
git pull
echo "Deployed"