Skip to content

Disable tree shaking #2

Disable tree shaking

Disable tree shaking #2

Workflow file for this run

name: Build and deploy website
on: [push]
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
defaults:
run:
shell: bash
jobs:
build_demo:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: "3.16.0"
cache: true
# Manually Update this `key`
cache-key: "20230512"
- name: Build demo for web
run: |
cd packages/fleather/example
flutter build web --no-tree-shake-icons
- name: Archive the demo build
uses: actions/upload-artifact@v3
with:
name: demo_web_build
path: build/web
build_website:
runs-on: ubuntu-latest
needs: build_demo
env:
HUGO_VERSION: 0.111.3
steps:
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb
- name: Install Dart Sass Embedded
run: sudo snap install dart-sass-embedded
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Install Node.js dependencies
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true"
- name: Download demo web build
uses: actions/download-artifact@v3
with:
name: demo_web_build
- name: Copy demo web build
run: cp packages/fleather/example/build/web docs/content/en/demo
- name: Build with Hugo
env:
# For maximum backward compatibility with Hugo modules
HUGO_ENVIRONMENT: production
HUGO_ENV: production
run: |
hugo \
--gc \
--minify \
--baseURL "${{ steps.pages.outputs.base_url }}/"
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: ./public
deploy_website:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build_website
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4