🚀 Deploy to Github Pages (taiga-ui.dev) #3285
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: 🚀 Deploy to Github Pages (taiga-ui.dev) | |
on: | |
workflow_run: | |
workflows: ['🚀 Snapshots'] | |
types: | |
- completed | |
workflow_dispatch: | |
inputs: | |
dryRun: | |
type: boolean | |
required: false | |
description: --dry-run | |
jobs: | |
deploy-gh-pages: | |
if: ${{ !contains(github.event.workflow_run.head_branch, 'release/') }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: taiga-family/ci/actions/setup/[email protected] | |
- uses: taiga-family/ci/actions/setup/[email protected] | |
- name: Prepare demo before deploy from snapshots | |
run: | | |
git clone --depth 1 --branch snapshots/demo/v3.x ${{ env.REPO }} ${{ env.DIST }} | |
git clone --depth 1 --branch snapshots/demo/v2.x ${{ env.REPO }} ${{ env.DIST }}/v2 | |
git clone --depth 1 --branch snapshots/demo/next/main ${{ env.REPO }} ${{ env.DIST }}/next | |
- name: Cleanup after clone snapshots | |
run: find ${{ env.DIST }} -name ".git" -exec rm -rf {} \; > /dev/null 2>&1 || echo "removed .git" | |
- name: Debug output | |
run: tree ${{ env.DIST }} -P '*.html' | |
- name: Deploy to taiga-ui.dev | |
uses: peaceiris/[email protected] | |
if: ${{ github.event.inputs.dryRun != 'true' }} | |
with: | |
github_token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }} | |
publish_dir: ${{ env.DIST }} | |
cname: taiga-ui.dev | |
concurrency: | |
group: deploy-gh-pages | |
cancel-in-progress: true |