website.yml 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. name: Deploy uppy.io
  2. on:
  3. push:
  4. branches: main
  5. jobs:
  6. deploy:
  7. name: Deploy
  8. runs-on: ubuntu-latest
  9. steps:
  10. - name: Checkout sources
  11. uses: actions/checkout@v3
  12. - name: Get yarn cache directory path
  13. id: yarn-cache-dir-path
  14. run: echo "::set-output name=dir::$(corepack yarn config get cacheFolder)"
  15. - uses: actions/cache@v3
  16. id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
  17. with:
  18. path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
  19. key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
  20. restore-keys: |
  21. ${{ runner.os }}-yarn-
  22. - name: Install Node.js
  23. uses: actions/setup-node@v3
  24. with:
  25. node-version: lts/*
  26. - name: Install dependencies
  27. run: corepack yarn install --immutable
  28. env:
  29. # https://docs.cypress.io/guides/references/advanced-installation#Skipping-installation
  30. CYPRESS_INSTALL_BINARY: 0
  31. - name: Build Uppy
  32. run: corepack yarn run build
  33. - name: Build website
  34. run: corepack yarn run web:build
  35. - name: Prepare deployment
  36. run: corepack yarn run web:prepare-deploy --quiet
  37. env:
  38. DEPLOY_DIR: ${{github.workspace}}/_deploy
  39. - name: Push to Github Pages
  40. uses: crazy-max/ghaction-github-pages@v2
  41. with:
  42. target_branch: gh-pages
  43. build_dir: _deploy # relative to `github.workspace`
  44. committer: 'Uppy Bot <uppybot@uppy.io>'
  45. author: 'Uppy Bot <uppybot@uppy.io>'
  46. commit_message: Update transloadit/uppy website
  47. fqdn: uppy.io
  48. jekyll: false
  49. env:
  50. GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}