Skip to content

Use goat counter in place of Google Analytics #164

Use goat counter in place of Google Analytics

Use goat counter in place of Google Analytics #164

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: CI
on:
push:
branches: [ "main" ]
repository_dispatch:
types: deploy
pull_request:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- name: Checkout Main
uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Install Dependencies
shell: bash -l {0}
run: npm i
- name: Build Site
shell: bash -l {0}
run: |
./build.py
npm run export
echo "dev.lfortran.org" >> out/CNAME
env:
PR_NUMBER: ${{ github.event.pull_request.number }}
- name: Misc Steps
shell: bash -l {0}
run: |
mv out deploy
- name: Upload Site
shell: bash -l {0}
run: ci/upload_site.sh
env:
GIT_PR_PREVIEW_PRIVATE_SSH_KEY: ${{ secrets.GIT_PR_PREVIEW_PRIVATE_SSH_KEY }}
PR_NUMBER: ${{ github.event.pull_request.number }}
- name: Create Deployment Comment
if: ${{ github.ref != 'refs/heads/main' && github.event.pull_request.head.repo.full_name == 'lfortran/lcompilers_frontend' }}
uses: peter-evans/create-or-update-comment@v2
with:
issue-number: ${{ github.event.pull_request.number }}
body: |
Your site is deployed at https://lfortran.github.io/pull_request_preview/lfortran/${{ github.event.pull_request.number }}
reactions: 'rocket'