-
-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (66 loc) · 1.87 KB
/
release.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
name: 🚀 Release
on:
workflow_dispatch:
jobs:
ci:
uses: ./.github/workflows/__shared-ci.yml
secrets: inherit
release:
name: 🚀 Release
needs: ci
runs-on: ubuntu-latest
environment: github-pages
permissions:
contents: write
pull-requests: write
steps:
- uses: actions/checkout@v4
- uses: hoverkraft-tech/ci-github-nodejs/actions/setup-node@0.8.0
- uses: actions/download-artifact@v4
with:
name: build
path: /
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: node
target-branch: main
skip-github-release: true
- name: 📦 Publish NPM packages
if: ${{ steps.release.outputs.release_created }}
env:
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }}
run: yarn publish --access public
docs-publish:
name: 📖 Publish documentation
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: ci
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: build
path: /
- run: |
mkdir ./_site_tmp
echo -e "theme: jekyll-theme-cayman" > ./_site_tmp/_config.yml
cp README.md ./_site_tmp/index.md
cp -R docs ./_site_tmp/
cp -R build/docs ./_site_tmp/typedoc
- name: ⚙️ Setup Pages
uses: actions/configure-pages@v5
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: _site_tmp
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
- name: 🚀 Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4