-
Notifications
You must be signed in to change notification settings - Fork 6
54 lines (43 loc) · 1.56 KB
/
bundle.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
name: Upload Meerkat Bundle to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
jobs:
upload-meerkat-to-gh-pages:
if: "contains(github.event.head_commit.message, 'release-please--branches--main')"
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repository
uses: actions/checkout@v3
- name: 🫡 Setup node
uses: actions/setup-node@v1
with:
node-version: 18.12.0
- name: 🧘♀️ Download dependencies
run: npm ci
- name: 📦 Build the Meerkat bundle
run: npm run build
- name: 👀 Lookup version
run: |
echo "VERSION=$(sed -n 's/.*\"version\": *\"\([^\"]*\)\".*/\1/p' package.json)" >> $GITHUB_ENV
- name: 🎨 Create version folder
run: mkdir -p ${{ env.VERSION }}
- name: 💃🏻 Move files into the version folder
run: |
mv dist/meerkat.min.js ${{ env.VERSION }}/meerkat.min.js
mv dist/meerkat.min.js.map ${{ env.VERSION }}/meerkat.min.js.map
mv dist/meerkat.min.js.LICENSE.txt ${{ env.VERSION }}/meerkat.min.js.LICENSE.txt
- name: 📅 Publish latest version on gh-pages
uses: JamesIves/github-pages-deploy-action@v4
with:
BRANCH: gh-pages
folder: ${{ env.VERSION }}
target-folder: latest/
- name: 🥁 Publish explicit version on gh-pages
uses: JamesIves/github-pages-deploy-action@v4
with:
BRANCH: gh-pages
folder: ${{ env.VERSION }}
target-folder: ${{ env.VERSION }}/