deploy-example.yaml 996 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. name: Deploy Example
  2. on:
  3. push:
  4. branches: [master]
  5. jobs:
  6. deploy:
  7. runs-on: ubuntu-latest
  8. steps:
  9. - uses: actions/checkout@v2
  10. - uses: actions/setup-node@v2
  11. with:
  12. node-version: '16.x'
  13. - uses: actions/cache@v2
  14. with:
  15. path: |
  16. ~/.npm
  17. ~/.config/yarn/global
  18. key: ${{ runner.os }}-node-${{ hashFiles('**/yarn.lock') }}
  19. restore-keys: |
  20. ${{ runner.os }}-node-
  21. - name: Install Yarn
  22. run: |
  23. npm install -g yarn
  24. yarn install
  25. - name: Build
  26. run: yarn build
  27. - name: GH Pages
  28. run: |
  29. echo 'example.livekit.io' > ./example/build/CNAME
  30. git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
  31. yarn exec gh-pages -- -d ./example/build -u "github-actions-bot <support+actions@github.com>" --no-history
  32. env:
  33. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}