Skip to content

Merge pull request #101 from IngeniumUA/dev #45

Merge pull request #101 from IngeniumUA/dev

Merge pull request #101 from IngeniumUA/dev #45

Workflow file for this run

on:
push:
branches: [ main ]
jobs:
publish:
runs-on: ubuntu-latest
environment: Production
name: Publish to Cloudflare Pages - Production
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: '18.x'
- name: Download Sentry CLI
run: curl -sL https://sentry.io/get-cli/ | bash
- name: Install dependencies
run: npm install
- name: Run linter
run: npm run lint
- name: Build
run: npm run build-revision-file && npm run build
- name: Inject debug ID's
run: sentry-cli sourcemaps inject dist/ingeniumuahubfront/browser
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
- name: Upload sourcemaps to Sentry
run: sentry-cli sourcemaps upload --release ${{ github.sha }} dist/ingeniumuahubfront/browser
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
SENTRY_PROJECT: ${{ secrets.SENTRY_PROJECT }}
- name: Remove source maps
run: rm -f dist/ingeniumuahubfront/browser/*.map
- name: Copy 3rdpartylicenses.txt to browser folder
run: cp dist/ingeniumuahubfront/3rdpartylicenses.txt dist/ingeniumuahubfront/browser
- name: Publish to Cloudflare Pages
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
projectName: ${{ vars.CLOUDFLARE_PROJECT_NAME }}
directory: dist/ingeniumuahubfront/browser
branch: main
wranglerVersion: '3'