Make Self Host Zip #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Bundle | |
on: | |
workflow_dispatch: | |
jobs: | |
build-and-bundle: | |
runs-on: ubuntu-latest | |
permissions: write-all | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@master | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 22 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Build project | |
run: pnpm build | |
- name: Bundle server.js | |
run: | | |
pnpm esbuild server.js --bundle --platform=node --outfile=bundled-server.js | |
- name: Create distribution package | |
run: | | |
mkdir -p package | |
cp -r dist package/ | |
cp bundled-server.js package/server.js | |
cd package | |
zip -r ../dist-package.zip . | |
- name: Upload artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist-package | |
path: dist-package.zip |