-
Notifications
You must be signed in to change notification settings - Fork 4
44 lines (43 loc) · 1007 Bytes
/
deploy.yml
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
name: Build and Deploy
on:
push:
branches:
- the-eg
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v2
with:
ref: the-eg
path: src
- name: Checkout current
uses: actions/checkout@v2
with:
ref: main
path: live
- name: Setup NodeJS
uses: actions/setup-node@v1
with:
node-version: '14'
- name: Install npm and deps
run: |
npm install -g npm@7
cd src
npm install --no-audit
- name: Build site
run: |
cd src
npm run build
- name: Prepare deployment
run: |
rm -rf live/*
cp -r src/public/* live
- name: Commit & deploy
uses: EndBug/add-and-commit@v7
with:
cwd: "live"
branch: main
message: "deploy: ${{ github.sha }}"
default_author: github_actions