Deploy website #132
This file contains hidden or 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: "Deploy website" | |
on: | |
push: | |
schedule: | |
- cron: "0 12 * * 4" # weekly on thursday | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- name: print bun version | |
run: bun --version | |
- name: import lockfile | |
run: bun pm migrate | |
- name: install dependencies | |
run: bun install --frozen-lockfile | |
- name: run scraping | |
run: bun run scripts/scrape.ts | |
- name: build | |
run: bunx --bun astro build | |
- uses: JamesIves/github-pages-deploy-action@v4 | |
if: github.ref == 'refs/heads/master' | |
with: | |
folder: dist | |
- name: build | |
run: BASE="/staging/" bunx --bun astro build | |
if: github.ref == 'refs/heads/rewrite' | |
- uses: JamesIves/github-pages-deploy-action@v4 | |
if: github.ref == 'refs/heads/rewrite' | |
with: | |
folder: dist | |
target-folder: staging |