Skip to content

Deploy

Deploy #19

Workflow file for this run

name: Deploy
on:
schedule:
- cron: "0 */6 * * *" # Every 6 hours
push:
branches: [main]
workflow_dispatch: # Manual trigger
# Add permissions for the GITHUB_TOKEN
permissions:
contents: write
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
env:
NODE_OPTIONS: "--max-http-header-size=16384"
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: "20"
- name: Install dependencies
run: npm ci
- name: Fetch new feeds
run: npm run refresh
- name: Configure Git
run: |
git config --global user.name 'GitHub Action'
git config --global user.email '[email protected]'
- name: Commit feed updates
run: |
git add src/content/feeds/
git diff --staged --quiet || (git commit -m "Update feeds" && git push)
- name: Build
run: npm run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist