Skip to content

Update GitHub Pages #17

Update GitHub Pages

Update GitHub Pages #17

Workflow file for this run

name: Update GitHub Pages
on:
schedule:
- cron: '0 0 * * *' # Runs at midnight UTC every day
push:
branches:
- master # Triggers when you push to the main branch
workflow_dispatch: # Allows manual trigger from GitHub UI
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20' # Set Node.js version
- name: Build the site
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
node generateIndex.js
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v3
with:
path: _site/
deploy:
needs: build
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4