-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (44 loc) · 1.18 KB
/
ci.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: CI
on: push
jobs:
ci:
runs-on: ubuntu-latest
steps:
- name: Checkout ✅
uses: actions/checkout@v2
- name: Setup 🏗
uses: actions/setup-node@v2
with:
node-version: 16.14.0
cache: 'npm'
- name: Install ⚙️
run: npm ci
- name: Test Unitaire 📋
run: npm run test:ci
- name: Test e2e 📋
run: npm run cy:ci
- name: Build 🛠
run: npm run build:ci
- name: Archive build
if: success()
uses: actions/upload-artifact@v1
with:
name: deploy_dist
path: dist
deploy:
runs-on: ubuntu-latest
needs: ci
name: Deploying to surge
if: ${{ github.ref == 'refs/heads/master' }}
steps:
- uses: actions/checkout@v2
- name: Download build
uses: actions/download-artifact@v1
with:
name: deploy_dist
- name: Install surge and fire deployment
uses: actions/setup-node@v1
with:
node-version: 16.14.0
- run: npm install -g surge
- run: surge ./deploy_dist/angular_best_practice ${{ secrets.SURGE_DOMAIN }} --token ${{ secrets.SURGE_TOKEN }}