Skip to content

github pages ci/cd

github pages ci/cd #3

Workflow file for this run

name: Deploy Astro to GitHub Pages
on:
push:
branches:
- main
permissions:
contents: read
pages: write
id-token: write
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
# 1. Config repository
- name: Checkout code
uses: actions/checkout@v3
# 2. Config Node.js
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 22
cache: 'npm'
# 3. Install dependencies
- name: Install dependencies
run: npm install
# 4. Compile Astro
- name: Build Astro
run: npm run build
# 5. Deploy
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v1