mirror of
https://github.com/flutter/samples.git
synced 2025-11-08 13:58:47 +00:00
39 lines
931 B
YAML
39 lines
931 B
YAML
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@83b7061638ee4956cf7545a6f7efe594e5ad0247
|
|
with:
|
|
submodules: true
|
|
fetch-depth: 0
|
|
|
|
- uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa
|
|
|
|
- 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@373f7f263a76c20808c831209c920827a82a2847
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: web/samples_index/public
|