Skip to content

Deploy

Deploy #48

Workflow file for this run

name: Deploy
on:
workflow_run:
workflows:
- CI
types:
- completed
branches:
- main
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Setup Node
uses: actions/setup-node@v4.0.2
with:
node-version: '20.11.1'
- name: Install Dependencies
run: npm ci
- name: Save error log
uses: actions/upload-artifact@v4.3.0
if: ${{ failure() }}
with:
name: npm-debug-log-${{ hashFiles('package-lock.json') }}
path: npm-debug.log
- name: Build
run: npm run build:story
- name: Deploy
uses: JamesIves/github-pages-deploy-action@v4.5.0
with:
branch: gh-pages
folder: packages/story/build
fail:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- name: Print error message
run: echo 'CI failed, skipping Deploy.'