Skip to content

Commit 2fbc72e

Browse files
committed
WIP
1 parent 5732a71 commit 2fbc72e

File tree

7 files changed

+141
-7
lines changed

7 files changed

+141
-7
lines changed

.github/workflows/gh-pages.yml

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,52 @@ on:
77

88
jobs:
99
deploy:
10-
runs-on: ubuntu-20.04
10+
runs-on: ubuntu-latest
1111
concurrency:
1212
group: ${{ github.workflow }}-${{ github.ref }}
1313
steps:
14-
- uses: actions/checkout@v3
15-
- name: Create publish directory
16-
run: mkdir out
17-
- name: Copy static files
18-
run: cp ./public/index.html out
19-
- name: Deploy
14+
steps:
15+
- name: 🛑 Cancel Previous Runs
16+
uses: styfle/[email protected]
17+
18+
- name: ⬇️ Checkout repo
19+
uses: actions/checkout@v3
20+
21+
- name: ⎔ Setup node
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: 16
25+
26+
- name: 📥 Download deps
27+
uses: bahmutov/npm-install@v1
28+
29+
- name: 🍼 Create pages build
30+
run: npm run build
31+
32+
- name: 🥅 Deploy to GH-Pages
2033
uses: peaceiris/actions-gh-pages@v3
2134
if: ${{ github.ref == 'refs/heads/main' }}
2235
with:
2336
github_token: ${{ secrets.GITHUB_TOKEN }}
2437
publish_dir: ./out
38+
39+
test:
40+
name: Test
41+
runs-on: ubuntu-latest
42+
steps:
43+
- name: 🛑 Cancel Previous Runs
44+
uses: styfle/[email protected]
45+
46+
- name: ⬇️ Checkout repo
47+
uses: actions/checkout@v3
48+
49+
- name: ⎔ Setup node
50+
uses: actions/setup-node@v3
51+
with:
52+
node-version: 16
53+
54+
- name: 📥 Download deps
55+
uses: bahmutov/npm-install@v1
56+
57+
- name: ⚡ Run test
58+
run: npm test

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
.history
2+
node_modules
3+
out

package-lock.json

Lines changed: 42 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
{
2+
"name": "@ci-cd/playground-monorepo",
3+
"version": "0.0.0",
4+
"description": "Playground for testing GitHub CI/CD",
5+
"scripts": {
6+
"test": "npm run test --workspace=@ci-cd/test",
7+
"build": "npm run build --workspace=@ci-cd/pages"
8+
},
9+
"repository": {
10+
"type": "git",
11+
"url": "git+https://github.com/dbsystel/cicd-playground.git"
12+
},
13+
"license": "Apache-2.0",
14+
"bugs": {
15+
"url": "https://github.com/dbsystel/cicd-playground/issues"
16+
},
17+
"homepage": "https://github.com/dbsystel/cicd-playground#readme",
18+
"workspaces": [
19+
"packages/*"
20+
]
21+
}

packages/ci-cd-pages/package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "@ci-cd/pages",
3+
"version": "0.0.0",
4+
"description": "Create gh-pages for the Playground",
5+
"scripts": {
6+
"build": "mkdir out && cp ./public/index.html out && mv out ../.."
7+
},
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/dbsystel/cicd-playground.git"
11+
},
12+
"license": "Apache-2.0",
13+
"bugs": {
14+
"url": "https://github.com/dbsystel/cicd-playground/issues"
15+
},
16+
"homepage": "https://github.com/dbsystel/cicd-playground#readme"
17+
}
File renamed without changes.

packages/ci-cd-test/package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "@ci-cd/test",
3+
"version": "0.0.0",
4+
"description": "Test the Playground",
5+
"scripts": {
6+
"test": "echo \"It is all good, man\" && exit 0"
7+
},
8+
"repository": {
9+
"type": "git",
10+
"url": "git+https://github.com/dbsystel/cicd-playground.git"
11+
},
12+
"license": "Apache-2.0",
13+
"bugs": {
14+
"url": "https://github.com/dbsystel/cicd-playground/issues"
15+
},
16+
"homepage": "https://github.com/dbsystel/cicd-playground#readme"
17+
}

0 commit comments

Comments
 (0)