Skip to content

7.1.5

7.1.5 #107

Workflow file for this run

name: website
on:
push:
branches:
- '*-release'
jobs:
publish-website:
runs-on: ubuntu-latest
if: github.repository_owner == 'visgl'
env:
MapboxAccessToken: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
steps:
- uses: actions/[email protected]
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: '16.x'
- name: Get version
id: get-version
run: LATEST=$(npm show react-map-gl version | grep -o -E "^[0-9]+\.[0-9]+") && echo "::set-output name=latest::/${LATEST}-release"
- name: Check version
if: ${{ !endsWith(github.ref, steps.get-version.outputs.latest) }}
run: |
echo "Website is only published from the latest release branch"
- name: Build website
if: ${{ endsWith(github.ref, steps.get-version.outputs.latest) }}
run: |
yarn bootstrap
cd website
yarn
yarn build
- name: Deploy
if: ${{ endsWith(github.ref, steps.get-version.outputs.latest) }}
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: website/build
CLEAN: true