33 lines
686 B
YAML
33 lines
686 B
YAML
|
name: Publish on GitHub Pages
|
||
|
|
||
|
on:
|
||
|
push:
|
||
|
branches:
|
||
|
- master
|
||
|
pull_request:
|
||
|
|
||
|
jobs:
|
||
|
deploy:
|
||
|
runs-on: ubuntu-20.04
|
||
|
concurrency:
|
||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||
|
steps:
|
||
|
- uses: actions/checkout@v3
|
||
|
|
||
|
- name: Install Node.js
|
||
|
uses: actions/setup-node@v3
|
||
|
with:
|
||
|
node-version: 18
|
||
|
|
||
|
- name: Install dependencies
|
||
|
run: npm ci
|
||
|
- run: npm lint
|
||
|
- run: npm run build --if-present
|
||
|
|
||
|
- name: Deploy
|
||
|
uses: peaceiris/actions-gh-pages@v3
|
||
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||
|
with:
|
||
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||
|
publish_dir: ./dist
|