-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (38 loc) · 1.16 KB
/
main.yaml
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
name: Build and Deploy
on:
push:
branches:
- main # change this to your default branch name if it's not 'main'
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 20
- name: Install Dependencies
run: npm ci
- name: Lint
run: npm run lint
- name: Test
run: npm run ci:test
- name: Automated Version Bump
uses: phips28/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
- name: Build
run: npm run build:prod
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: dist
path: dist/chuck-norris-joke-generator/browser
- name: Deploy
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: dist/chuck-norris-joke-generator/browser # The folder the action should deploy.
token: ${{ secrets.GH_TOKEN }} # The GitHub token.