Skip to content

Merge pull request #384 from terrestris/init-reference #426

Merge pull request #384 from terrestris/init-reference

Merge pull request #384 from terrestris/init-reference #426

Workflow file for this run

name: Release
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources ๐Ÿ”ฐ
uses: actions/checkout@v2
- name: Setup Node.js 18 ๐Ÿงฎ
uses: actions/setup-node@v1
with:
node-version: 18
- name: Cache Node.js modules ๐Ÿ’พ
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.OS }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.OS }}-node-
${{ runner.OS }}-
- name: Install dependencies โฌ
run: npm ci
- name: Build artifacts ๐Ÿ—๏ธ
run: npm run build
- name: Build docs ๐Ÿ“”
run: npm run build:docs
- name: Get the version ๐Ÿ“Ž
run: |
echo "VERSION=$(node -pe "require('./package.json').version")" >> $GITHUB_ENV
- name: Deploy (v${{ env.VERSION }}) ๐Ÿš€
uses: JamesIves/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: docs
target-folder: v${{ env.VERSION }}
- name: Deploy docs (latest) ๐Ÿš€
uses: JamesIves/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
branch: gh-pages
folder: docs
target-folder: latest
- name: Release ๐Ÿš€
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release