-
Notifications
You must be signed in to change notification settings - Fork 25
70 lines (63 loc) · 1.79 KB
/
nodejs.yml
File metadata and controls
70 lines (63 loc) · 1.79 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Node CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [14.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: npm install, build, and test
run: |
npm run build --if-present
- name: Spit out version file
run: echo "`date -u`" > out/when.txt
- name: Archive static site
uses: actions/upload-artifact@v4
with:
name: static-output
path: out
deploy-storage:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/download-artifact@master
with:
name: static-output
path: out
- uses: LanceMcCarthy/Action-AzureBlobUpload@v2
with:
source_folder: out
container_name: $web
connection_string: ${{ secrets.STORAGE_CONNECTION_STRING }}
clean_destination_folder: 'true'
deploy-docker-hub:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@master
with:
name: static-output
path: out
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.dockerhub_user }}
password: ${{ secrets.dockerhub_password }}
- name: Build and push Docker images
uses: docker/build-push-action@v2.2.1
with:
context: .
file: ./Dockerfile
push: true
tags: ytechie/msdevshow:latest