Skip to content

CI on main

CI on main #135

name: Build & Deploy gh-pages
run-name: CI on ${{ github.ref_name }}
on:
workflow_dispatch:
inputs:
force_deploy_ghpages:
description: "Force deploy gb-pages"
default: false
type: boolean
required: false
pull_request:
branches-ignore:
- "gh-pages"
push:
branches: [main]
tags: ["v*"]
jobs:
ghpages:
name: Build and Deploy gh-pages
runs-on: ubuntu-latest
steps:
# https://github.com/japgolly/setup-everything-scala
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0 # Needed for the release tag // `git fetch --tags` will also work
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "lts/*"
- name: Build
run: |
yarn install
yarn build
- name: Deploy
if: (inputs.force_deploy_ghpages == true) || (github.ref == 'refs/heads/main') || startsWith(github.ref, 'refs/tags/v')
# https://github.com/marketplace/actions/github-pages-action
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.IDENTUS_CI }}
publish_dir: ./build
# cname: doc.did.fmgp.app