Skip to content
This repository was archived by the owner on Apr 17, 2023. It is now read-only.

Commit 14aa75d

Browse files
authored
ci: add deploy workflow (#77)
* ci: add deploy workflow * ci: regression regarding node version * ci(deploy): actually run the publish script
1 parent 4df5821 commit 14aa75d

File tree

2 files changed

+23
-11
lines changed

2 files changed

+23
-11
lines changed
Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
name: Deploy Docs
22
on:
3-
push:
4-
branches:
5-
- main
3+
release:
4+
types:
5+
- created
6+
67
jobs:
7-
docs:
8-
name: Deploy Docs
8+
deploy:
9+
name: Deploy
910
runs-on: ubuntu-latest
1011
steps:
1112
- name: Checkout repository
1213
uses: actions/checkout@v2
1314

14-
- name: Install Node v15
15+
- name: Install Node
1516
uses: actions/setup-node@v1
1617
with:
1718
node-version: 15
@@ -28,12 +29,23 @@ jobs:
2829
- name: Install deps
2930
run: pnpm i
3031

31-
- name: Build the code
32-
run: pnpm run build
32+
- name: Set up Docker Buildx
33+
uses: docker/setup-buildx-action@v1
34+
35+
- name: Login to DockerHub
36+
uses: docker/login-action@v1
37+
with:
38+
username: ${{ secrets.DOCKERHUB_USERNAME }}
39+
password: ${{ secrets.DOCKERHUB_TOKEN }}
40+
41+
- name: Publish to NPM & Docker
42+
run: pnpm run publish
43+
env:
44+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3345

34-
- name: Build the docs
46+
- name: Build documentation
3547
run: pnpm run docs
36-
48+
3749
- name: Place CNAME
3850
run: echo "cordis.js.org" >| ./doc/CNAME
3951

.github/workflows/quality.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ jobs:
88
- name: Checkout repository
99
uses: actions/checkout@v2
1010

11-
- name: Install Node v15
11+
- name: Install Node
1212
uses: actions/setup-node@v1
1313
with:
1414
node-version: 15

0 commit comments

Comments
 (0)