Skip to content

Commit

Permalink
feat: GH action for deploying WASM bundle
Browse files Browse the repository at this point in the history
  • Loading branch information
ZakFarmer committed Oct 27, 2023
1 parent 8c1b1e7 commit a360346
Showing 1 changed file with 37 additions and 0 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/deploy-wasm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Deploy WASM bundle

on:
push:
branches: ["main", "develop"]
pull_request:
branches: ["main"]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: "18"

- name: Install dependencies and build
run: |
cd wasm
npm ci
npm run build
- name: Setup AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-1

- name: Upload to S3
run: |
aws s3 sync wasm/dist s3://zakfarmer-php-rs

0 comments on commit a360346

Please sign in to comment.