1.1.0 #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" | |