Skip to content

Audio upload fixes #321

Audio upload fixes

Audio upload fixes #321

Workflow file for this run

name: Storybook
on:
push:
branches:
- master
pull_request:
branches:
- master
concurrency:
# New commits cancel previous builds only on pull requests. This is because `github.head_ref`` is only set on pull requests and `github.sha`` is unique for each commit.
group: storybook-${{ github.head_ref || github.sha }}
cancel-in-progress: true
jobs:
generate-storybook:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v2
- name: Set up deploy key
run: |
mkdir -p ~/.ssh
echo "$STORYBOOK_DEPLOY_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
md5sum ~/.ssh/id_ed25519
ls -la ~/.ssh
env:
STORYBOOK_DEPLOY_KEY: ${{ secrets.STORYBOOK_DEPLOY_KEY }}
if: ${{ github.ref == 'refs/heads/master' }}
- name: Check out storybook repository
run: git clone --branch gh-pages [email protected]:rage/secret-project-storybook.git ./shared-module/storybook-static-repo
env:
GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_ed25519 -o IdentitiesOnly=yes"
if: ${{ github.ref == 'refs/heads/master' }}
- name: npm ci
run: npm ci
working-directory: ./shared-module
- name: npm run build-storybook
run: npm run build-storybook -- --quiet
working-directory: ./shared-module
- name: Remove old files from repo
run: rm -rf ./shared-module/storybook-static-repo/*
if: ${{ github.ref == 'refs/heads/master' }}
- name: Copy new files to repo
run: cp -r ./shared-module/storybook-static/* ./shared-module/storybook-static-repo/
if: ${{ github.ref == 'refs/heads/master' }}
- name: Commit files
run: |
git config --local user.email "[email protected]"
git config --local user.name "github-actions[bot]"
git add .
git commit -m "Update: $GITHUB_SHA" --allow-empty
working-directory: ./shared-module/storybook-static-repo
if: ${{ github.ref == 'refs/heads/master' }}
- name: Push changes
run: git push
env:
GIT_SSH_COMMAND: "ssh -o StrictHostKeyChecking=no -i ~/.ssh/id_ed25519 -o IdentitiesOnly=yes"
working-directory: ./shared-module/storybook-static-repo
if: ${{ github.ref == 'refs/heads/master' }}