Merge pull request #201 from mediamonks/dependabot/npm_and_yarn/story… #59
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 documentation to Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: ['main'] | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: 'pages' | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Pages | |
uses: actions/configure-pages@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- name: Install dependencies | |
env: | |
GSAP_TOKEN: ${{ secrets.GSAP_TOKEN }} | |
run: | | |
npm config set //npm.greensock.com/:_authToken=$GSAP_TOKEN | |
npm config set @gsap:registry=https://npm.greensock.com | |
npm ci | |
- name: Build Storybook | |
run: | | |
npm run build | |
npm run storybook:build | |
- name: Compose documentation | |
run: | | |
mkdir .docs | |
cp -vr ./packages/documentation/.docs/* ./.docs/ | |
cp -vr ./packages/muban-transition-component/.docs/* ./.docs/muban-transition-component | |
cp -vr ./packages/react-animation/.docs/* ./.docs/react-animation | |
cp -vr ./packages/react-transition-presence/.docs/* ./.docs/react-transition-presence | |
- name: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: './.docs/' | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v1 |