Skip to content

Commit

Permalink
ci: add web deployment on pushing master (#5)
Browse files Browse the repository at this point in the history
* ci: add web deployment on pushing master

* ci: add upload artifacts step

* ci: remove android build step
  • Loading branch information
jeroen-meijer authored Jul 25, 2020
1 parent 15f59d3 commit 2f187ca
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 12 deletions.
15 changes: 3 additions & 12 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,16 +9,11 @@ jobs:
app:
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./app
WORKING_DIRECTORY: ./app/
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Java
uses: actions/setup-java@v1
with:
java-version: "12.x"

- name: Install Flutter
uses: subosito/flutter-action@v1.3.0
with:
Expand All @@ -40,16 +35,12 @@ jobs:
- name: Check intl ARBs
run: ./tool/ci/intl_extract_to_arb.sh

- name: Build APK
run: flutter build apk --release
working-directory: ${{ env.WORKING_DIRECTORY }}

dict_parser:
runs-on: ubuntu-latest
container:
image: google/dart:2.8.4
env:
WORKING_DIRECTORY: ./dict_parser
WORKING_DIRECTORY: ./dict_parser/
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -71,7 +62,7 @@ jobs:
container:
image: google/dart:2.8.4
env:
WORKING_DIRECTORY: ./shared_models
WORKING_DIRECTORY: ./shared_models/
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/publish_web.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Publish Web
on:
push:
branches:
- master

jobs:
publish_web:
runs-on: ubuntu-latest
env:
WORKING_DIRECTORY: ./app/
BUILD_DIR: ./app/build/web/
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Install Flutter
uses: subosito/flutter-action@v1.3.0
with:
channel: beta
flutter-version: 1.20.0-7.2.pre

- name: Install dependencies
run: flutter pub get
working-directory: ${{ env.WORKING_DIRECTORY }}

- name: Build
run: flutter build web --release
working-directory: ${{ env.WORKING_DIRECTORY }}

- name: Publish
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.BUILD_DIR }}
publish_branch: web

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: web_build
path: ${{ env.BUILD_DIR }}
1 change: 1 addition & 0 deletions app/web/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
shiritori.jfk.dev

0 comments on commit 2f187ca

Please sign in to comment.