name: Deploy to GitHub Pages # Declare default permissions as read only. permissions: read-all on: push: branches: - main jobs: build-and-deploy: permissions: contents: write runs-on: ubuntu-latest if: github.repository == 'flutter/samples' steps: - name: Checkout uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 with: submodules: true fetch-depth: 0 - uses: subosito/flutter-action@dbf1fa04f4d2e52c33185153d06cdb5443aa189d - name: Init scripts run: dart pub get working-directory: web/_tool - name: Build run: dart run _tool/build_ci.dart working-directory: web - name: Deploy uses: peaceiris/actions-gh-pages@de7ea6f8efb354206b205ef54722213d99067935 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: web/samples_index/public