VPN termux about China.net

.yml

 name: Compile C++ to WebAssembly and Deploy to GitHub Pages

on:
  push:
    branches:
      - main  # lub master, w zależności od tego, jak nazywa się Twoja główna gałąź

jobs:
  build-and-deploy:
    runs-on: ubuntu-latest

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Install Emscripten
        run: |
          git clone https://github.com/emscripten-core/emsdk.git
          cd emsdk
          ./emsdk install latest
          ./emsdk activate latest
        shell: bash

      - name: Compile C++ to WebAssembly
        run: |
          source emsdk/emsdk_env.sh
          mkdir -p dist
          em++ bombermanV.cpp \
            -s WASM=1 \
            -s USE_SDL=2 \
            -O3 \
            -o dist/index.html
        shell: bash

      - name: Deploy to GitHub Pages
        uses: peaceiris/actions-gh-pages@v4
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./dist

No comments:

Post a Comment