-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
09cf915
commit 1d1c634
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -40,6 +40,21 @@ jobs: | |
AWS_REGION: ${{ secrets.AWS_REGION }} | ||
SOURCE_DIR: "./dist" | ||
DEST_DIR: pr/${{ github.event.pull_request.number }} | ||
- name: Capture usage statistics | ||
id: stats | ||
run: | | ||
LAYER_COUNT=$(node scripts/stats.js -c) | ||
STYLE_SIZE=$(node scripts/stats.js -s) | ||
LAYER_STATS=$(node scripts/stats.js -a) | ||
echo "LAYER_COUNT<<EOF" >> $GITHUB_ENV | ||
echo -e "$LAYER_COUNT" >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
echo "STYLE_SIZE<<EOF" >> $GITHUB_ENV | ||
echo -e "$STYLE_SIZE" >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
echo "LAYER_STATS<<EOF" >> $GITHUB_ENV | ||
echo -e "$LAYER_STATS" >> $GITHUB_ENV | ||
echo "EOF" >> $GITHUB_ENV | ||
- name: Comment Pull Request | ||
uses: thollander/[email protected] | ||
with: | ||
|
@@ -55,4 +70,12 @@ jobs: | |
![Sprites 1x](https://preview.ourmap.us/pr/${{ github.event.pull_request.number }}/sprites/sprite.png) | ||
![Sprites 2x](https://preview.ourmap.us/pr/${{ github.event.pull_request.number }}/sprites/[email protected]) | ||
Style Size: | ||
* ${{ env.LAYER_COUNT }} | ||
* ${{ env.STYLE_SIZE }} | ||
``` | ||
${{ env.LAYER_STATS }} | ||
``` | ||
comment_tag: pr_preview |