Skip to content

build: trigger publish just on push to main branch #28

build: trigger publish just on push to main branch

build: trigger publish just on push to main branch #28

Workflow file for this run

name: publish-docs
on:
workflow_dispatch:
inputs:
name:
description: 'reason'
required: false
default: 'updates on contents'
push:
branches:
- main
paths:
- '!*'
- 'docs/**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js v20.x
uses: actions/setup-node@v3
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
cache: 'yarn'
- name: Setup Pages
uses: actions/configure-pages@v3
- run: yarn install
- run: yarn docs-build
- name: upload github pages artifact
uses: actions/upload-pages-artifact@v2
with:
path: './lib-docs'
publish:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: true
environment:
name: github-pages
url: https://micene09.github.io/scarlett
steps:
- name: publish
id: deployment
uses: actions/deploy-pages@v2