diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..130aa2a --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,46 @@ +name: Deploy to GitHub Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: ["master"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + + # Build job + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Set Up Clang + uses: egor-tensin/setup-clang@v1 + with: + version: latest + platform: x64 + - name: Build Project + run: | + chmod +x tasks/*.sh + tasks/build.sh + tasks/gendisk.sh + echo y | npx tsx src/assembler/assembler.ts src/assembler/draw.asm boot.bin + sudo tasks/updboot.sh + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + + # Deployment job + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4