Create webpack.yml #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: "Automated Build" | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
name: Build and Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
- uses: oven-sh/setup-bun@8f24390df009a496891208e5e36b8a1de1f45135 # v1 | |
with: | |
bun-version: 1.0.1 | |
- name: Cache node_modules | |
id: cache-npm-packages | |
uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2 | |
env: | |
cache-name: cache-node_modules | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('bun.lockb') }} | |
- name: Install Dependencies | |
if: ${{ steps.cache-npm-packages.outputs.cache-hit != 'true' }} | |
run: bun install | |
- name: Build | |
run: bun run build | |
- name: Commit & Push changes | |
uses: actions-js/push@5a7cbd780d82c0c937b5977586e641b2fd94acc5 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
message: Update dist/index.js; ${{ github.event.head_commit.message }} | |
branch: dist | |
force: true |