From 93383e910cedef2fd0703be2e2e54639b1828a2f Mon Sep 17 00:00:00 2001 From: "Michael A. Hawker" Date: Sun, 21 Apr 2024 15:18:37 -0700 Subject: [PATCH] Add bun.yml for GitHub Pages Workflow --- .github/workflows/bun.yml | 56 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/bun.yml diff --git a/.github/workflows/bun.yml b/.github/workflows/bun.yml new file mode 100644 index 0000000..16bdf15 --- /dev/null +++ b/.github/workflows/bun.yml @@ -0,0 +1,56 @@ +name: Bun Build + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Setup Bun + uses: oven-sh/setup-bun@v1 + + - name: Build + run: | + bun install + bun run build + + # See https://github.com/actions/upload-pages-artifact + - name: Fix permissions + run: | + chmod -c -R +rX "dist/" | while read line; do + echo "::warning title=Invalid file permissions automatically fixed::$line" + done + + - name: Upload Pages artifact + uses: actions/upload-pages-artifact@v3 + with: + path: dist/ + + # Deploy job https://github.com/actions/deploy-pages + deploy: + # Add a dependency to the build job + needs: build + + # Grant GITHUB_TOKEN the permissions required to make a Pages deployment + permissions: + pages: write # to deploy to Pages + id-token: write # to verify the deployment originates from an appropriate source + + # Deploy to the github-pages environment + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + # Specify runner + deployment step + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4