1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/.github/workflows/main.yml
Janne Savolainen a0fb46c3e6
Switch to using NPM workspaces (#7115)
* Switch to using npm over yarn

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove reference to `yarn` from documentation

Signed-off-by: Sebastian Malton <sebastian@malton.name>

* Enable NPM workspaces

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Introduce script for installing all dependencies

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove usage of lerna bootstrap for no longer being used

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Fix build by not bundling libraries for application in node environment (main) as Electron does that

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Tweak evil static import paths in build of application

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Consolidate npmrc configs to root since required by workspaces

Co-authored-by: Mikko Aspiala <mikko.aspiala@gmail.com>

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Make application build not fail for not detecting electron version

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Update package-lock

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Make sure native dependencies are rebuilt for electron

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Remove unused binary for causing trouble when installing dependencies

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Update package-lock

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

* Disable caching in CI for Windows

Installing Electron in Windows seems to be broken in this regards.

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>

---------

Signed-off-by: Janne Savolainen <janne.savolainen@live.fi>
Signed-off-by: Sebastian Malton <sebastian@malton.name>
Co-authored-by: Sebastian Malton <sebastian@malton.name>
2023-02-20 12:48:18 +02:00

98 lines
2.6 KiB
YAML

name: Publish docs via GitHub Pages
on:
push:
branches:
- master
release:
types:
- published
concurrency:
group: publish-docs
cancel-in-progress: true
jobs:
verify-docs:
name: Verify docs
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Checkout Release from lens
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Using Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Generate Extensions API Reference using typedocs
run: |
npm install
npm run build:docs
- name: Verify that the markdown is valid
run: |
npm run mkdocs:verify
build:
name: Deploy docs
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
needs: verify-docs
steps:
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install git+https://${{ secrets.GH_TOKEN }}@github.com/lensapp/mkdocs-material-insiders.git
pip install mike
- name: Checkout Release from lens
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: git config
run: |
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
- name: Using Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Generate Extensions API Reference using typedocs
run: |
npm ci
npm run build:docs
- name: mkdocs deploy master
if: contains(github.ref, 'refs/heads/master')
run: |
mike deploy --push master
- name: Get the release version
if: contains(github.ref, 'refs/tags/v') && !github.event.release.prerelease
id: get_version
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_OUTPUT
- name: mkdocs deploy new release
if: contains(github.ref, 'refs/tags/v') && !github.event.release.prerelease
run: |
mike deploy --push --update-aliases ${{ steps.get_version.outputs.VERSION }} latest
mike set-default --push ${{ steps.get_version.outputs.VERSION }}