mirror of https://github.com/flutter/samples.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
39 lines
927 B
39 lines
927 B
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@d171c3b028d844f2bf14e9fdec0c58114451e4bf
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0
|
|
|
|
- uses: subosito/flutter-action@6c2e035f2692eeac890d854df95630c72673f130
|
|
|
|
- name: Init scripts
|
|
run: dart pub get
|
|
working-directory: web/_tool
|
|
|
|
- name: Build
|
|
run: dart _tool/build_ci.dart
|
|
working-directory: web
|
|
|
|
- name: Deploy
|
|
uses: peaceiris/actions-gh-pages@068dc23d9710f1ba62e86896f84735d869951305
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: web/samples_index/public
|