diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 2e4d006..3631cef 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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: @@ -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 @@ -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 diff --git a/.github/workflows/publish_web.yaml b/.github/workflows/publish_web.yaml new file mode 100644 index 0000000..76d6850 --- /dev/null +++ b/.github/workflows/publish_web.yaml @@ -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 }} diff --git a/app/web/CNAME b/app/web/CNAME new file mode 100644 index 0000000..0e1ad44 --- /dev/null +++ b/app/web/CNAME @@ -0,0 +1 @@ +shiritori.jfk.dev \ No newline at end of file