update run time and do other tidyup #82
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: Publish on Deno Deploy | |
on: | |
push: | |
# Run on main branch pushes or PRs | |
branches: [main] | |
pull_request: | |
branches: [main] | |
# Allow to manually trigger the workflow | |
workflow_dispatch: | |
schedule: | |
# Rebuild every day at 8:04 PM UTC | |
- cron: "40 16 * * *" | |
jobs: | |
build: | |
# What OS to use | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
# pages: write | |
# What steps to run | |
steps: | |
- name: Clone repository | |
# Git clone the repository | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.head_ref }} | |
fetch-depth: '0' # 0 is Fetch all history for git | |
- name: Setup Deno environment | |
# Downloads deno and caches it | |
uses: denoland/setup-deno@v2 | |
with: | |
# Latest Deno 2.x version | |
deno-version: v2.x | |
- name: Build site | |
# Run the build script from deno.json | |
run: deno task build | |
- name: Commit changes | |
# Commit the changes to the repository | |
uses: stefanzweifel/git-auto-commit-action@v5 | |
with: | |
commit_message: Apply changes during gh actions build | |
status_options: "--untracked-files=no" | |
- name: Deploy to Deno Deploy | |
# Push the built site to Deno Deploy | |
uses: denoland/deployctl@v1 | |
with: | |
# Deno Deploy project name | |
project: rick-cogley-jp | |
# Where are the deno components located | |
import-map: "./deno.json" | |
# Which file acts as the web server | |
entrypoint: serve.ts |