Create Demo and Docs #4
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Create Demo and Docs | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- master | |
paths: | |
- 'demo/**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
demo: | |
runs-on: ubuntu-latest | |
name: Create Demo and Docs | |
steps: | |
- name: Set build timestamp | |
run: echo "BUILD_DATE=$(date -u --iso-8601='seconds')" >> ${GITHUB_ENV} | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
cache: 'npm' | |
- run: npm ci --legacy-peer-deps | |
- run: npm run demo:build | |
- uses: crazy-max/[email protected] | |
with: | |
target_branch: gh-pages | |
build_dir: demo/dist | |
commit_message: "Update ${BUILD_DATE}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |