Skip to content

Commit

Permalink
update ci
Browse files Browse the repository at this point in the history
  • Loading branch information
MMMzq committed Oct 2, 2019
1 parent a998135 commit faaa661
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 9 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/deploy_web.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: deploy

on:
release:
types: [published,edited]

jobs:
deploy-web:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1

- name: Setup flutter
run: |
git clone https://github.com/flutter/flutter.git -b master --depth 1
./flutter/bin/flutter doctor
./flutter/bin/flutter --version
- name: Enable web
run: ./flutter/bin/flutter config --enable-web

- name: Build web
run: cd example && ../flutter/bin/flutter build web && cd ..

- name: Deploy web To GH-Page
uses: peaceiris/actions-gh-pages@v2.4.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./example/build/web/
10 changes: 1 addition & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: ci

on: [push,pull_request,release]
on: [push,pull_request]

jobs:
build:
Expand Down Expand Up @@ -46,11 +46,3 @@ jobs:

- name: Build web
run: cd example && ../flutter/bin/flutter build web && cd ..

- name: Deploy web To GH-Page
if: github.ref == 'master' && github.event_name == 'release'
uses: peaceiris/actions-gh-pages@v2.4.0
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./example/build/web/

0 comments on commit faaa661

Please sign in to comment.