Fix astro build to support gh-pages
This commit is contained in:
parent
f98eb00a97
commit
ce3d87d8e3
2 changed files with 18 additions and 23 deletions
39
.github/workflows/build.yml
vendored
39
.github/workflows/build.yml
vendored
|
|
@ -1,19 +1,21 @@
|
|||
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
|
||||
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
|
||||
|
||||
name: Build feed
|
||||
name: Deploy to GitHub Pages
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# Trigger the workflow every time you push to the `main` branch
|
||||
# Using a different branch name? Replace `main` with your branch’s name
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
branches: [main]
|
||||
# Allows you to run this workflow manually from the Actions tab on GitHub.
|
||||
workflow_dispatch:
|
||||
# Build every 6 hours
|
||||
schedule:
|
||||
- cron: "0 */6 * * *" # At minute 0 past every 6th hour.
|
||||
|
||||
|
||||
|
||||
# Allow this job to clone the repo and create a page deployment
|
||||
permissions:
|
||||
contents: read
|
||||
pages: write
|
||||
id-token: write
|
||||
|
||||
|
|
@ -21,26 +23,17 @@ jobs:
|
|||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Setup Bun
|
||||
uses: oven-sh/setup-bun@v1
|
||||
with:
|
||||
bun-version: latest
|
||||
- run: bun install
|
||||
- run: bun run build
|
||||
env:
|
||||
YAZZY_URL: ${{ vars.YAZZY_URL }}
|
||||
FEEDS: ${{ vars.FEEDS }}
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-pages-artifact@v3
|
||||
with:
|
||||
path: dist/
|
||||
- name: Checkout your repository using git
|
||||
uses: actions/checkout@v4
|
||||
- name: Install, build, and upload your site output
|
||||
uses: withastro/action@v2
|
||||
|
||||
deploy:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: github-pages
|
||||
url: ${{ steps.deployment.outputs.page_url }}
|
||||
runs-on: ubuntu-latest
|
||||
needs: build
|
||||
steps:
|
||||
- name: Deploy to GitHub Pages
|
||||
id: deployment
|
||||
|
|
|
|||
|
|
@ -3,6 +3,8 @@ import { defineConfig } from "astro/config";
|
|||
|
||||
// https://astro.build/config
|
||||
export default defineConfig({
|
||||
site: "https://carterworks.github.io/",
|
||||
base: "rss-reader",
|
||||
output: "static",
|
||||
integrations: [tailwindIntegration()],
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in a new issue