| name: Deploy to GitHub Pages |
| |
| on: |
| push: |
| branches: |
| - main |
| |
| # Declare default permissions as read only. |
| permissions: read-all |
| |
| jobs: |
| build-and-deploy-docs: |
| permissions: |
| contents: write |
| runs-on: ubuntu-latest |
| if: github.repository == 'dart-lang/linter' |
| |
| steps: |
| - name: Checkout repository |
| uses: actions/checkout@8e5e7e5ab8b370d6c329ec480221332ada57f0ab |
| - name: Setup Dart |
| uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f |
| with: |
| sdk: dev |
| - name: Get dependencies |
| run: dart pub get |
| - name: Generate docs |
| run: dart run tool/doc.dart --create-dirs --no-markdown --out lints |
| - name: Deploy docs |
| uses: peaceiris/actions-gh-pages@373f7f263a76c20808c831209c920827a82a2847 |
| with: |
| github_token: ${{ secrets.GITHUB_TOKEN }} |
| publish_branch: gh-pages |
| publish_dir: lints |
| destination_dir: lints |
| keep_files: true |