-
Notifications
You must be signed in to change notification settings - Fork 170
36 lines (32 loc) · 979 Bytes
/
gh-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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@c85c95e3d7251135ab7dc9ce3241c5835cc595a9
- 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 --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