docs: Update README.md (#872) #64
This file contains hidden or 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: Preview Docs | |
| on: | |
| pull_request: | |
| branches: [main, next] | |
| paths: | |
| - 'examples/**' | |
| - 'website/**' | |
| - '.github/workflows/preview-docs.yml' | |
| push: | |
| branches: [main, next] | |
| paths: | |
| - 'examples/**' | |
| - 'website/**' | |
| - '.github/workflows/preview-docs.yml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| preview-docs: | |
| name: Build Preview Artifacts + Website | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: kuhnroyal/flutter-fvm-config-action@v2 | |
| id: fvm-config-action | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }} | |
| channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| - name: Setup Melos | |
| run: | | |
| dart pub global activate melos | |
| melos bootstrap | |
| - name: Build Flutter Preview Bundle | |
| run: bash examples/scripts/build_web_previews.sh --local | |
| - name: Copy Preview Bundle to Website | |
| run: | | |
| mkdir -p website/public/previews | |
| cp -r examples/build/web/* website/public/previews/ | |
| - name: Install Website Dependencies | |
| run: cd website && pnpm install | |
| - name: Validate Preview Manifest | |
| run: cd website && pnpm run check:previews | |
| - name: Build Website | |
| run: cd website && pnpm run build |