Skip to content

Commit

Permalink
tmp CI to remove
Browse files Browse the repository at this point in the history
  • Loading branch information
fgravin committed Jul 25, 2023
1 parent aad322a commit a0f4453
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 451 deletions.
106 changes: 0 additions & 106 deletions .github/workflows/artifacts.yml

This file was deleted.

143 changes: 0 additions & 143 deletions .github/workflows/checks.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/cleanup.yml

This file was deleted.

48 changes: 6 additions & 42 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,23 @@
name: Deploy
run-name: 🚀 Deploy to GitHub Pages for ${{ github.event_name == 'issue_comment' && 'PR' || '🌱' }} ${{github.event_name == 'issue_comment' && github.event.issue.number || github.ref_name}}
run-name: 🚀 Deploy to GitHub Pages For Documentation

env:
NODE_VERSION: 16.17.0

# This workflow runs whenever the "deploy affected apps" checkbox is checked (for PR)
# or on every push to main
# This workflow runs for Pull Requests which are not draft,
# as well as commits going to the default branch
on:
push:
branches:
- main
issue_comment:
types:
- edited

concurrency:
group: deploy-${{ github.ref }}
cancel-in-progress: true
- doc-website

jobs:
checks:
if: github.event_name != 'issue_comment' || github.event.issue.pull_request
name: Check whether a deploy was requested on a PR
runs-on: ubuntu-latest
outputs:
shouldRun: ${{ github.event_name != 'issue_comment' || (contains(github.event.changes.body.from, '- [ ] 🚀 Build and deploy storybook and demo on GitHub Pages') && contains(github.event.comment.body, '- [x] 🚀 Build and deploy storybook and demo on GitHub Pages')) || '' }}
ref: ${{ github.event_name == 'issue_comment' && steps.comment-branch.outputs.head_ref || '' }}

steps:
- uses: xt0rted/pull-request-comment-branch@v1
if: github.event_name == 'issue_comment'
id: comment-branch

gh-pages:
needs: checks
if: github.event_name != 'issue_comment' || needs.checks.outputs.shouldRun
name: Deploy Storybook to GitHub Pages
runs-on: ubuntu-latest
env:
BRANCH_NAME: ${{needs.checks.outputs.ref || 'main'}}
BRANCH_NAME: ${{needs.checks.outputs.ref || 'doc-website'}}

steps:
- name: Dump GitHub event
Expand All @@ -57,29 +36,14 @@ jobs:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'

- name: add initial comment
uses: thollander/actions-comment-pull-request@v2
if: github.event_name == 'issue_comment'
with:
message: 'GitHub Pages links:
🚧 building in progress... 🚧'
comment_tag: github-links
pr_number: ${{ github.event.issue.number }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- name: Install
run: npm ci

- name: Build storybook
run: npm run build:storybook

- name: Build demo & web components
run: npm run build:demo

- name: Build docs
run: npm run docs:build --base=/${{env.BRANCH_NAME}}/docs && mv docs/.vitepress/dist dist
run: npm run docs:build -- --base=/geonetwork-ui/${{env.BRANCH_NAME}}/docs/ && mkdir -p dist/docs && mv docs/.vitepress/dist/* dist/docs

# FIXME: restore a system for testing web components but faster/lighter than storybook
# - name: Build storybook for web components
Expand Down
Loading

0 comments on commit a0f4453

Please sign in to comment.