add analytics #23
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
name: Build & Deploy Titan Reactor | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- dev | |
- main | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
deployments: write | |
steps: | |
- name: Checkout π | |
uses: actions/checkout@v3 | |
with: | |
lfs: true | |
- name: Checkout LFS objects | |
run: git lfs checkout | |
- name: Setup node env π | |
uses: actions/setup-node@v3 | |
with: | |
node-version: lts/gallium | |
cache: 'yarn' | |
- name: Install dependencies π¨π»βπ» | |
run: yarn install | |
- name: Run build | |
run: yarn build | |
env: | |
VITE_OFFICIAL_PLUGINS_SERVER_URL: ${{ secrets.VITE_OFFICIAL_PLUGINS_SERVER_URL }} | |
VITE_PLUGINS_RUNTIME_ENTRY_URL: ${{ secrets.VITE_PLUGINS_RUNTIME_ENTRY_URL }} | |
- name: Publish Titan Reactor | |
uses: cloudflare/pages-action@1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: titan-reactor | |
directory: ./dist/titan-reactor | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish Titan Reactor Runtime | |
uses: cloudflare/pages-action@1 | |
with: | |
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} | |
projectName: titan-reactor-runtime | |
directory: ./dist/runtime | |
gitHubToken: ${{ secrets.GITHUB_TOKEN }} |