name: Web # only build single instance of docs for latest main branch on: push: branches: - main jobs: deploy: runs-on: ubuntu-latest permissions: contents: write pages: write id-token: write steps: - name: Install dependencies working-directory: ${{github.workspace}} shell: bash run: | wget https://github.com/gbdk-2020/gbdk-2020/releases/download/4.4.0/gbdk-linux64.tar.gz tar -xzf gbdk-linux64.tar.gz - name: Checkout repo uses: actions/checkout@v4 with: path: repo fetch-depth: 0 - name: Get core count id: core_count run : cat /proc/cpuinfo | grep processor | wc -l - name: Build working-directory: ${{github.workspace}}/repo shell: bash run: | make clean make GBDK_HOME=${{github.workspace}}/gbdk GBDK_RELEASE=1 all -j $(nproc) DATE=$(date "+%Y_%m_%d_%H_%M_%S") cp duality.gb docs/duality.gb cp duality.gb docs/duality_$DATE.gb sed -i "s/duality.gb/duality_$DATE.gb/g" docs/index.html - name: Setup Pages uses: actions/configure-pages@v2 - name: Upload artifact uses: actions/upload-pages-artifact@v3 with: path: ${{github.workspace}}/repo/docs - name: Deploy to GitHub Pages id: deployment uses: actions/deploy-pages@v4