From 85bfbd238a195c295624fa435e9dd9d9da89cdb8 Mon Sep 17 00:00:00 2001 From: Sam Tay Date: Sun, 22 Sep 2024 01:04:29 -0400 Subject: [PATCH] Try out SSG --- .github/workflows/staging.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/staging.yml b/.github/workflows/staging.yml index 6c6983b..95f2673 100644 --- a/.github/workflows/staging.yml +++ b/.github/workflows/staging.yml @@ -65,20 +65,21 @@ jobs: # Build our Dioxus app in release. - name: Build app working-directory: app - run: dx build --release --platform web --features web + run: dx build --profile release --platform static-generation --features static-generation # Fixup index.html (see https://github.com/DioxusLabs/dioxus/issues/2847) - - name: Fixup index.html + - name: Fixup build output run: | - cd dist - for f in *.css; do - sed -i "/<\/head>/i " index.html - done + ./dist/birdtalk + cp -r ./static/* ./dist/public + cd dist/public sed -i 's///' index.html + sed -i 's///' birds/index.html + sed -i 's///' play/index.html # Create our required `404.html` page. - name: Create 404.html - run: cp dist/index.html dist/404.html + run: cp dist/public/index.html dist/public/404.html - uses: supabase/setup-cli@v1 with: @@ -93,6 +94,6 @@ jobs: uses: JamesIves/github-pages-deploy-action@v4.2.3 with: branch: static-develop # The branch we have GitHub pages setup in. - folder: dist # The folder we want to copy to the `gh-pages` branch. + folder: dist/public # The folder we want to copy to the `gh-pages` branch. target-folder: . # The destination we want our files copied to. In this case, we want them to be a the root level. clean: true