Repository navigation
66 lines (54 loc) · 2.15 KB
/
Copy pathtest.yml
File metadata and controls
66 lines (54 loc) · 2.15 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
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: MarkdownMaster CMS CI Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [22.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
# Install dependencies in a ci mode
- run: npm ci
# Run a lint test to verify the syntax
- run: npm run lint
# Check for issues and compile the base code
- run: npm run build
# Run all test suites
- run: npm run test
# Generate docs (to be uploaded)
- run: npm run docs
- name: Set file headers
run: bash update_file_headers.sh
- name: Set SSH Key
shell: bash
run: |
mkdir -p ~/.ssh/
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -t rsa markdownmaster.com >> ~/.ssh/known_hosts
env:
SSH_PRIVATE_KEY: ${{secrets.PROD_DEPLOYMENT_KEY}}
- name: Upload docs to Production
run: bash upload_docs.sh latest
# Build the deployable tarball
# will set variable steps.archive.outputs.filename
- name: Generate Archive
id: archive
run: bash build_release.sh
- name: Upload Package (App)
run: rsync -avz release/${{ steps.archive.outputs.app }} markdownmaster@markdownmaster.com:/home/markdownmaster/public_html/build/markdownmaster-app-unstable.tgz
- name: Upload Package (Full)
run: rsync -avz release/${{ steps.archive.outputs.full }} markdownmaster@markdownmaster.com:/home/markdownmaster/public_html/build/markdownmaster-full-unstable.tgz