deps: update uppy to 4.7.0 (#277) #191
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 | |
on: | |
workflow_dispatch: | |
inputs: | |
UPPY_REF: | |
type: string | |
description: Uppy ref | |
required: false | |
workflow_call: | |
inputs: | |
UPPY_REF: | |
type: string | |
required: false | |
push: | |
branches: | |
- main | |
# Review gh actions docs if you want to further define triggers, paths, etc | |
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on | |
env: | |
NODE_VERSION: lts/* | |
permissions: | |
contents: write | |
jobs: | |
deploy: | |
name: Deploy to GitHub Pages | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- if: ${{ !inputs.UPPY_REF }} | |
name: Extract Uppy version from yarn.lock | |
id: UPPY_VERSION_FROM_YARN_LOCK | |
run: | | |
grep 'resolution: "uppy@' yarn.lock | awk -F'"' '{ sub(/npm:/, ""); print "UPPY_REF=" $2 }' >> "$GITHUB_OUTPUT" | |
- name: Checkout docs from Uppy repo | |
uses: actions/checkout@v4 | |
with: | |
repository: transloadit/uppy | |
ref: | |
${{ inputs.UPPY_REF || | |
steps.UPPY_VERSION_FROM_YARN_LOCK.outputs.UPPY_REF }} | |
path: uppy | |
- run: mv uppy /tmp/uppy && ln -s /tmp/uppy/docs docs | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ env.NODE_VERSION }} | |
cache: yarn | |
env: | |
SKIP_YARN_COREPACK_CHECK: 1 | |
- name: Install dependencies | |
run: corepack yarn install --immutable | |
- name: Build website | |
run: corepack yarn build | |
# Recommended action by Docusaurus: | |
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
# Build output to publish to the `gh-pages` branch: | |
publish_dir: ./build |