Skip to content

Build & Deploy API #152

Build & Deploy API

Build & Deploy API #152

Workflow file for this run

name: Build & Deploy API
on:
push:
schedule:
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
build:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
name: Build static API files
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Generate static API files
continue-on-error: false
run: node src/index.mjs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
deploy:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
name: Deploy to Github Pages
needs: build
if: needs.build.result == 'success'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4