-
Notifications
You must be signed in to change notification settings - Fork 0
63 lines (59 loc) · 1.69 KB
/
deployment.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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Deployment
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "20"
- name: Install dependencies
run: |
npm install
- name: Lint
run: |
npm run lint
- name: Build App
run: |
npm run build
- name: Test
uses: cypress-io/github-action@v6
with:
start: npm run dev
- name: "Deploy to Netlify"
uses: nwtgck/[email protected]
with:
publish-dir: "./dist"
production-branch: main
production-deploy: true
deploy-message: "Deploy from GitHub Actions"
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_TOKEN_SECRET }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
build_and_push_Docker_images:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: "Set up QEMU"
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN}}
- name: Build and push
uses: docker/build-push-action@v5
with:
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/kanban:latest
- name: Run the image in a container
uses: addnab/docker-run-action@v3
with:
image: ${{ secrets.DOCKERHUB_USERNAME }}/kanban:latest
run: |
echo "Running the docker image"