-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (25 loc) · 953 Bytes
/
deploy.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
name: Deploy to CDN
on:
push:
branches: [ 'master' ]
tags: [ 'v*.*.*' ]
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- run: echo $GITHUB_REF
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: '21'
cache: 'npm'
- run: npm ci
- run: |
export MINOR=$(./node_modules/.bin/semver-extract --minor --branch $GITHUB_REF)
echo "MINOR=$MINOR"
export PUBLIC_URL=https://cdn.jsdelivr.net/gh/data-fair/app-charts@deploy/$MINOR/
npm run build
git config --global user.email "github-actions@koumoul.com"
git config --global user.name "github-actions"
./node_modules/.bin/gh-pages-multi deploy -v -r https://${{ secrets.GH_TOKEN }}@github.com/data-fair/app-charts.git -b deploy -s dist --no-history -t $MINOR
echo -e "\n\nNew version of the application available at\n\t$PUBLIC_URL"