Skip to content

Commit

Permalink
Merge pull request #5 from PicsArt/COPS-3786
Browse files Browse the repository at this point in the history
COPS-3786 Create github workflow to build and upload to s3 bucket
  • Loading branch information
arammkhitaryan authored Jan 16, 2025
2 parents 7dd3d0e + 21d7937 commit e9aef11
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Auto Build

on:
push:
branches:
- 'main'

jobs:
build:
runs-on: ubuntu-latest

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

- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '22'

- name: Install dependencies
env:
GITLAB_REG_TOKEN: ${{ secrets.GITLAB_REG_TOKEN }}
run: |
cd picsart-miro-plugin
echo "//gitlab.com/api/v4/packages/npm/:_authToken=${GITLAB_REG_TOKEN}" >> .npmrc
npm install
- name: Run build
run: |
cd picsart-miro-plugin
npm run build
- name: Upload to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
run: |
aws s3 sync picsart-miro-plugin/dist s3://miro-plugin-cdn-bucket-cloudfront --delete
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
Safari enforces HTTPS; therefore, it doesn't allow localhost through HTTP.
- For more information, visit our [developer documentation](https://developers.miro.com).


### How to start locally

- Run `npm i` to install dependencies.
Expand Down
3 changes: 3 additions & 0 deletions picsart-miro-plugin/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
@picsart:registry=https://gitlab.com/api/v4/packages/npm/
//gitlab.com/api/v4/packages/npm/:_authToken=${GITLAB_REG_TOKEN}

0 comments on commit e9aef11

Please sign in to comment.