chore: Remove Rollbar usage (#411) #901
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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
release: | |
types: | |
- created | |
name: build-deploy | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
outputs: | |
public_url: ${{ steps.install.outputs.public_url }} | |
public_path: ${{ steps.install.outputs.public_path }} | |
steps: | |
- uses: actions/checkout@master | |
- name: Use Node.js 14.x | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14.x | |
cache: npm | |
- name: set package.json version | |
uses: menduz/oddish-action@master | |
with: | |
deterministic-snapshot: true | |
only-update-versions: true | |
- id: install | |
name: install | |
run: npm ci | |
- name: build | |
run: npm run build | |
- name: test | |
run: npm run test | |
- name: publish npm package | |
uses: menduz/oddish-action@master | |
with: | |
registry-url: "https://registry.npmjs.org" | |
access: public | |
cwd: ./build | |
## use action runId instead of current date to generate snapshot numbers | |
deterministic-snapshot: true | |
## inform gitlab after publishing to proceed with CDN propagation | |
gitlab-token: ${{ secrets.GITLAB_TOKEN }} | |
gitlab-pipeline-url: ${{ secrets.GITLAB_URL }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: deploy preview | |
env: | |
AWS_DEFAULT_REGION: us-east-1 | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
EXPLORER_WEB_BUCKET: ${{ secrets.EXPLORER_WEB_BUCKET }} | |
if: ${{ steps.install.outputs.public_path }} | |
run: | | |
npx @dcl/cdn-uploader@next \ | |
--bucket $EXPLORER_WEB_BUCKET \ | |
--local-folder build \ | |
--bucket-folder "${{ steps.install.outputs.public_path }}" | |
build-static: | |
runs-on: ubuntu-latest | |
outputs: | |
public_url: ${{ steps.install.outputs.public_url }} | |
public_path: ${{ steps.install.outputs.public_path }} | |
steps: | |
- uses: actions/checkout@master | |
- name: Use Node.js 14.x | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 14.x | |
cache: npm | |
- id: install | |
name: install | |
run: npm ci | |
env: | |
GEN_STATIC_LOCAL: true | |
- name: build for deployment | |
run: npm run build:full | |
env: | |
GEN_STATIC_LOCAL: true | |
- uses: actions/upload-artifact@v2 | |
with: | |
name: static-site-build | |
path: build | |
if-no-files-found: error | |
notify_deployment: | |
needs: [build] | |
if: ${{ github.event.pull_request.number }} | |
runs-on: ubuntu-latest | |
name: Deployment Notification | |
steps: | |
- name: Find Comment | |
uses: peter-evans/find-comment@v1 | |
id: fc | |
with: | |
issue-number: ${{ github.event.pull_request.number }} | |
comment-author: "github-actions[bot]" | |
body-includes: Test this pull request | |
- name: Create or update comment | |
uses: peter-evans/create-or-update-comment@v1 | |
with: | |
comment-id: ${{ steps.fc.outputs.comment-id }} | |
issue-number: ${{ github.event.pull_request.number }} | |
body: | | |
# Test this pull request | |
This branch can be previewed at | |
- [`stable` explorer](${{ needs.build.outputs.public_url }}/) | |
- [`development` explorer](${{ needs.build.outputs.public_url }}/?explorer-branch=dev) | |
edit-mode: replace |