-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (45 loc) · 1.48 KB
/
publish-page.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
name: Publish testbed page
on:
push:
branches:
- main
workflow_dispatch:
inputs:
npm_tag:
description: "NPM tag of @sebgroup/green-core to install"
default: "latest"
repository_dispatch:
types: [trigger-workflow]
concurrency: publish-testbed-page
jobs:
publish-testbed-page:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
steps:
- name: Checkout Project
uses: actions/checkout@v3
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: "lts/*"
cache: "npm"
- name: Install Project 📦
shell: bash
run: npm ci
- name: Install latest Green Core
run: npm install @sebgroup/green-core@${{ github.event.client_payload.npm_tag || github.event.inputs.npm_tag || 'latest' }}
- name: Build Project
run: npm run build
- name: Copy index.html to 404.html
run: cp dist/index.html dist/404.html # This is for GitHub Pages to work with client-side routing.
- name: Create green-version.json
run: |
echo "$(npm show @sebgroup/green-core version)" > dist/green-version.txt
- name: Deploy built storybooks to GitHub Pages
uses: JamesIves/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages # The branch the action should deploy to.
folder: dist # The folder the action should deploy.