forked from illright/attractions
-
Notifications
You must be signed in to change notification settings - Fork 0
94 lines (82 loc) · 2.56 KB
/
on-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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: Post-release chores
on:
release:
types: [published]
jobs:
deploy-docs:
name: Deploy docs to GitHub Pages
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set up Node 14 📦
uses: actions/setup-node@v2
with:
node-version: "14"
- name: Cache pnpm modules 🗄
uses: actions/cache@v2
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- name: Install pnpm 🧰
uses: pnpm/[email protected]
with:
version: 6.14.2
- name: Build docs 🔧
env:
SAPPER_APP_BASEPATH: attractions
run: |
pnpm install
pnpm run export -- --basepath attractions
- name: Publish 🚀
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/__sapper__/export/attractions/
force_orphan: true
release:
name: Release to npm
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
with:
persist-credentials: false
- name: Set up Node 14 📦
uses: actions/setup-node@v2
with:
node-version: "14"
registry-url: "https://registry.npmjs.org"
- name: Cache pnpm modules 🗄
uses: actions/cache@v2
env:
cache-name: cache-pnpm-modules
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- name: Install pnpm 🧰
uses: pnpm/[email protected]
with:
version: 6.14.2
- name: Build bundles 🔧
run: |
cp README.md LICENSE attractions/
cd attractions
pnpm install
pnpm run build
- name: Release 🚀
working-directory: attractions
run: pnpm publish --no-git-checks
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}