Skip to content
This repository has been archived by the owner on Feb 22, 2023. It is now read-only.

Deploy Storybook to GitHub pages #550

Merged
merged 6 commits into from
Dec 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/gh-pages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Storybook GitHub Pages

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ github.repository == 'WordPress/openverse-frontend' }}

steps:
- name: Checkout
uses: actions/checkout@v2

# setup node.js environment and npm
- name: Setup Node environment
uses: actions/setup-node@v2
with:
node-version: '16.x'

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-

- name: Setup pnpm
uses: pnpm/action-setup@v2.0.1
with:
version: 6.24.0
# Set this to false because we want to be able to skip installation if there is a cache hit in the next step
run_install: false

# install dependencies only if the cache is not present
- name: Install dependencies
if: steps.cache-node-modules.outputs.cache-hit != 'true'
run: pnpm install --frozen-lockfile

- name: Fetch translation files
run: pnpm i18n:get-translations

- name: Build Storybook
run: pnpm nuxt storybook build

- name: Deploy
uses: peaceiris/actions-gh-pages@bbdfb200618d235585ad98e965f4aafc39b4c501 # v3.7.3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./storybook-static
force_orphan: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

This repository is the frontend UI for accessing and exploring the openly-licensed content provided by the [Openverse API](https://github.com/wordpress/openverse-api).

The application is live at its previous home: [search.creativecommons.org](https://search.creativecommons.org/).
You can view [the application](https://wordpress.org/openverse) live on WordPress.org. You can also view [the production Storybook](https://wordpress.github.io/openverse-frontend)

## Technology

Expand Down