-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate docs and push to gh-pages automatically (#3443)
* Generate docs and push to gh-pages * Move to workflows * Fix workflow * Add support for unreleased linter versions * Keep preexisting files
- Loading branch information
Showing
2 changed files
with
79 additions
and
11 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
# Declare default permissions as read only. | ||
permissions: read-all | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
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@d171c3b028d844f2bf14e9fdec0c58114451e4bf | ||
- name: Setup Dart | ||
uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d | ||
with: | ||
sdk: stable | ||
- name: Get dependencies | ||
run: dart pub get | ||
- name: Generate docs | ||
run: dart run tool/doc.dart --create-dirs --no-markdown --out lints --token ${{ secrets.GITHUB_TOKEN }} | ||
- name: Deploy docs | ||
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_branch: gh-pages | ||
publish_dir: lints | ||
destination_dir: lints | ||
keep_files: true |
This file contains 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