-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (33 loc) · 940 Bytes
/
main.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
name: CI
on:
push:
branches: [ main ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/[email protected]
- name: Install dependencies
run: npm install
- name: Build
run: npm run build
- name: Clean
run: |
npm install del-cli
cat .npmignore | xargs -I {} npx del-cli '{}'
rm -rf node_modules
rm -f .gitignore
mkdir -p build
rsync -av --exclude='.git' ./ build/
- name: Deploy
uses: s0/[email protected]
env:
REPO: self
BRANCH: package
FOLDER: build
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
MESSAGE: "Deploy {sha}:\n{msg}"