diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 17e058c..8dddb22 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,7 +20,14 @@ jobs: with: submodules: 'recursive' - # Step 2: Set up Emscripten with caching + # Step 2: Set up Nix + - name: Install Nix + uses: cachix/install-nix-action@v24 + with: + extra_nix_config: | + experimental-features = nix-command flakes + + # Step 3: Set up Emscripten with caching - name: Cache Emscripten SDK and system libraries id: cache-emsdk uses: actions/cache@v3 @@ -37,19 +44,18 @@ jobs: version: ${{ env.EM_VERSION }} actions-cache-folder: ${{ env.EM_CACHE_FOLDER }} - # Step 3: Install xmake - - name: Install xmake + # Step 4: Install xmake using Nix + - name: Install xmake with Nix run: | - wget https://xmake.io/shget.text -O - | bash - source ~/.xmake/profile + nix-env -iA nixpkgs.xmake - # Step 4: Build for Web (WASM) + # Step 5: Build for Web (WASM) - name: Build for Web (WASM) run: | xmake f -p wasm -y xmake -y - # Step 5: Prepare artifacts + # Step 6: Prepare artifacts - name: Prepare artifacts run: | mkdir -p netlify-build @@ -59,7 +65,7 @@ jobs: cp -r fonts netlify-build/ cp -r images netlify-build/ - # Step 6: Deploy to Netlify + # Step 7: Deploy to Netlify - name: Deploy to Netlify uses: nwtgck/actions-netlify@v2 with: