Skip to content

Merge pull request #3 from filecoin-station/fix-deployment #36

Merge pull request #3 from filecoin-station/fix-deployment

Merge pull request #3 from filecoin-station/fix-deployment #36

Workflow file for this run

name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: cp wrangler.toml.example wrangler.toml
- uses: actions/setup-node@v4
with:
node-version: 22
- run: npm ci
- run: npm test
deploy:
if: github.ref == 'refs/heads/main'
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Deploy
uses: cloudflare/wrangler-action@v3
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
preCommands: |
cp wrangler.toml.example wrangler.toml
envsubst < wrangler.toml.example > wrangler.toml
postCommands: |
rm -f wrangler.toml
environment: production
secrets: |
INFLUX_TOKEN
env:
INFLUX_METRIC_NAME: ${{ vars.INFLUX_METRIC_NAME }}
INFLUX_URL: ${{ vars.INFLUX_URL }}
INFLUX_TOKEN: ${{ secrets.INFLUX_TOKEN }}
INFLUX_DATABASE: ${{ vars.INFLUX_DATABASE }}