-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (82 loc) · 2.55 KB
/
create-release-candidate.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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Create Release Candidate
on:
push:
branches:
- main
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/[email protected]
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: '15.x'
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: Yarn Install
uses: CultureHQ/[email protected]
with:
args: install --ignore-engines
# If the App is not deploy in the Servers root directory React needs to know where it is located.
#https://create-react-app.dev/docs/deployment/#building-for-relative-paths
- name: Set homepage in package.json
uses: jossef/action-set-json-field@v1
with:
file: package.json
field: homepage
value: https://bettercodepaul.github.io/davit/realease-candidate
- name: Yarn Build
uses: CultureHQ/[email protected]
with:
args: build
- name: Show files
run: ls -la
- name: Yarn Test
uses: CultureHQ/[email protected]
with:
args: test
- name: Lint
uses: CultureHQ/actions-yarn@master
with:
args: lint
- name: Upload Artifact
uses: actions/upload-artifact@v2
with:
name: build
path: build
deploy:
name: Deploy to Release Candidate
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: Download Artifact
uses: actions/download-artifact@v2
with:
name: build
- name: Show files
run: ls -la
- name: Deploy on Release Candidate
uses: JamesIves/[email protected]
if: success()
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: . # The folder the action should deploy.
TARGET_FOLDER: realease-candidate
CLEAN: true # Automatically remove deleted files from the deploy branch
#COMMIT_MESSAGE: 'Deploy commit $GITHUB_SHA'
SILENT: true