Update backend #20
Workflow file for this run
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: CI | |
on: | |
workflow_dispatch: | |
inputs: {} | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-frontend: | |
name: Build Frontend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Build Site | |
run: | | |
cd frontend | |
npm ci | |
echo "{}" > src/posts.json | |
npm run build | |
build-data: | |
name: Build Data | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Build data | |
working-directory: data | |
run: | | |
npm run build:posts | |
npm run build:rss | |
test-backend: | |
name: Deploy & Test Backend | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Deploy backend | |
uses: cloudflare/[email protected] | |
with: | |
apiToken: ${{ secrets.CF_API_KEY }} | |
accountId: ${{ secrets.CF_ACCOUNT }} | |
workingDirectory: backend | |
command: deploy --env staging | |
- name: Run Integration Tests | |
uses: grafana/[email protected] | |
with: | |
filename: backend/test/script.js |