Skip to content

fix: migrate to v4 GitHub Actions for Pages deployment #3

fix: migrate to v4 GitHub Actions for Pages deployment

fix: migrate to v4 GitHub Actions for Pages deployment #3

Workflow file for this run

name: Deploy Astro to GitHub Pages
on:
push:
branches: [main]
workflow_dispatch:
permissions:
contents: write
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
run: npm ci
- name: Build Astro
run: npm run build
- name: Add .nojekyll
run: touch dist/.nojekyll
- name: Upload build output
uses: actions/upload-pages-artifact@v4
with:
path: ./dist
deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4