Skip to content

Cadence Next (#200) #193

Cadence Next (#200)

Cadence Next (#200) #193

name: Build and Deploy
on:
workflow_dispatch:
push:
branches:
- master
permissions:
contents: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
# Load environment variables from repository settings,
# environment should be named "production"
# https://github.com/cadence-workflow/Cadence-Docs/settings/environments
environment: production
env:
CADENCE_DOCS_URL: ${{ vars.CADENCE_DOCS_URL || 'https://cadenceworkflow.io' }}
CADENCE_DOCS_BASE_URL: ${{ vars.CADENCE_DOCS_BASE_URL || '/Cadence-Docs/' }}
CADENCE_DOCS_ORGANIZATION: ${{ vars.CADENCE_DOCS_ORGANIZATION || 'cadence-workflow' }}
steps:
# same as build.yml
- name: Checkout 🛎️
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Use Node.js lts/hydrogen (v18)
uses: actions/setup-node@v4
with:
node-version: lts/hydrogen
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
cache: 'npm'
- name: Install and Build 🔧
run: |
npm install
npm run build
# additional steps to deploy
- name: Configure domain
uses: finnp/[email protected]
env:
FILE_NAME: "build/CNAME"
FILE_DATA: ${{ secrets.CUSTOM_DOMAIN }}
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages # The branch the action should deploy to.
folder: build # The folder the action should deploy.
clean: true # Automatically remove deleted files from the deploy branch