diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index 00ac85f7..d8763aec 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -60,18 +60,34 @@ jobs: env: GITHUB_TOKEN: '' - name: download binaries - working-directory: ./Browser_IDE + working-directory: ./Browser_IDE #python3 ./setup.py run: | - python3 ./setup.py + wget -O splashkit/splashkit_autocomplete.json https://raw.githubusercontent.com/WhyPenguins/SplashkitOnline/github-live/Browser_IDE/splashkit/splashkit_autocomplete.json + wget -O runtimes/javascript/bin/SplashKitBackendWASM.js https://raw.githubusercontent.com/WhyPenguins/SplashkitOnline/github-live/Browser_IDE/runtimes/javascript/bin/SplashKitBackendWASM.js + wget -O runtimes/javascript/bin/SplashKitBackendWASM.wasm https://raw.githubusercontent.com/WhyPenguins/SplashkitOnline/github-live/Browser_IDE/runtimes/javascript/bin/SplashKitBackendWASM.wasm + wget -O compilers/cxx/bin/wasi-sysroot.zip.lzma https://raw.githubusercontent.com/WhyPenguins/SplashkitOnline/github-live/Browser_IDE/compilers/cxx/bin/wasi-sysroot.zip.lzma + wget -O compilers/cxx/bin/clang++.js https://raw.githubusercontent.com/WhyPenguins/SplashkitOnline/github-live/Browser_IDE/compilers/cxx/bin/clang++.js + wget -O compilers/cxx/bin/clang.wasm.lzma https://raw.githubusercontent.com/WhyPenguins/SplashkitOnline/github-live/Browser_IDE/compilers/cxx/bin/clang.wasm.lzma + wget -O compilers/cxx/bin/wasm-ld.js https://raw.githubusercontent.com/WhyPenguins/SplashkitOnline/github-live/Browser_IDE/compilers/cxx/bin/wasm-ld.js + wget -O compilers/cxx/bin/lld.wasm.lzma https://raw.githubusercontent.com/WhyPenguins/SplashkitOnline/github-live/Browser_IDE/compilers/cxx/bin/lld.wasm.lzma + wget -O runtimes/cxx/bin/SplashKitBackendWASMCPP.js https://raw.githubusercontent.com/WhyPenguins/SplashkitOnline/github-live/Browser_IDE/runtimes/cxx/bin/SplashKitBackendWASMCPP.js + wget -O runtimes/cxx/bin/SplashKitBackendWASMCPP.worker.js https://raw.githubusercontent.com/WhyPenguins/SplashkitOnline/github-live/Browser_IDE/runtimes/cxx/bin/SplashKitBackendWASMCPP.worker.js env: GITHUB_TOKEN: '' - - name: Setup Pages - uses: actions/configure-pages@v5 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload IDE site - path: './Browser_IDE' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + # At this point any scripts that exist in the filesystem _cannot_ be trusted + # But I think (...?) if we do everything in the workflow from here on, + # it should be safe and be unable to trash the live site. I think anyway... + - name: Create Build Archive + run: tar -c --lzma -f deployed.tar.gz ./Browser_IDE # ${{ inputs.pr-number }} + - name: Clone Site Builds + run: | + rm -rf site-builds + git clone --single-branch --branch site-builds ${{ github.repository }} site-builds + mv deployed.tar.gz site-builds/ + - name: Upload Built Archive + working-directory: ./site-builds + run: | + git add deployed.tar.gz + git commit -m "Update builds" + git rebase -i HEAD~n + git push origin site-builds --force-with-lease