mirror of
https://github.com/visgl/luma.gl.git
synced 2025-12-08 17:36:19 +00:00
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
name: website
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '*-release'
|
|
|
|
jobs:
|
|
publish-website:
|
|
runs-on: ubuntu-latest
|
|
|
|
if: github.repository_owner == 'visgl'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2.1.1
|
|
with:
|
|
token: ${{ secrets.ADMIN_TOKEN }}
|
|
|
|
- name: Use Node.js
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: '18.x'
|
|
|
|
- name: Get version
|
|
id: get-version
|
|
run: LATEST=$(npm show @luma.gl/core 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/github-pages-deploy-action@3.7.1
|
|
with:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
BRANCH: gh-pages
|
|
FOLDER: website/public
|
|
CLEAN: true
|