Merge pull request #4 from Aram47/main #15
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: 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 | |