Skip to content

feat: add cloudflare web analytics #23

feat: add cloudflare web analytics

feat: add cloudflare web analytics #23

Workflow file for this run

name: Build
on:
push:
branches: [main]
permissions:
contents: read
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 'Checkout code'
uses: actions/checkout@v4
- name: 'Install Bun'
uses: oven-sh/setup-bun@v2
- name: 'Install dependencies'
run: bun install
- name: 'Run tests'
run: bun run lint
- name: 'Create ENV'
run: |
touch .env
echo "VITE_EMULATOR_VGA=${{ vars.VITE_EMULATOR_VGA }}" >> .env
echo "VITE_EMULATOR_RAM=${{ vars.VITE_EMULATOR_RAM }}" >> .env
echo "VITE_NETWORK_RELAY=${{ vars.VITE_NETWORK_RELAY }}" >> .env
echo "VITE_ROOTFS_ISO=${{ vars.VITE_ROOTFS_ISO }}" >> .env
- name: 'Build project'
run: bun run build
- name: 'Upload build artifacts'
uses: actions/upload-artifact@v4
with:
name: 'build-artifacts'
path: './dist/*'
deploy:
runs-on: ubuntu-latest
needs: build
permissions:
id-token: write
pages: write
contents: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Setup Pages
uses: actions/configure-pages@v5
- name: 'Getting artifacts'
uses: actions/download-artifact@v4
with:
name: 'build-artifacts'
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: '.'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4