forked from TheNetsky/community-extensions
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (37 loc) · 1.03 KB
/
main.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
name: Bundle and Publish Sources
on:
push:
branches:
- '**'
- '!main'
jobs:
build:
name: Bundle and Publish Sources
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
steps:
- name: Checkout Branch
uses: actions/checkout@v2
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Extract branch name
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
- name: Checkout existing bundles
uses: actions/checkout@v2
continue-on-error: true
with:
ref: gh-pages
path: bundles
- run: npm install
- run: npm run bundle -- --folder=${{ steps.extract_branch.outputs.branch }}
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: bundles