152 words
1 minute
Deploy this pages
2025-06-19
NOTE

I already have npm installed on my machine and have set up GitHub Pages.

  1. Create blog repository:
  2. Run npm install -g pnpm to install pnpm .
  3. Run pnpm install to install dependencies.
  4. Add deploy.yml file to .github/workflows folder.
    .github/workflows/deploy.yml
    name: Deploy to GitHub Pages
    on:
    push:
    branches: [ main ]
    workflow_dispatch:
    permissions:
    3 collapsed lines
    contents: read
    pages: write
    id-token: write
    jobs:
    build:
    6 collapsed lines
    runs-on: ubuntu-latest
    steps:
    - name: Checkout your repository using git
    uses: actions/checkout@v4
    - name: Install, build, and upload your site
    uses: withastro/action@v3
    deploy:
    9 collapsed lines
    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
  5. Edit the config file src/config.ts.
    src/config.ts
    export const siteConfig: SiteConfig = {
    title: "Slimaeus",
    subtitle: "My profile",
    //...
    }
  6. Edit the file astro.config.ts.
    astro.config.ts
    export default defineConfig({
    site: "https://slimaeus.github.io/",
    //...
    })
  7. Create .nojekyll empty file to the root folder.
  8. Run pnpm run format and pnpm run lint
  9. Commit and push.

References#

Deploy this pages
https://slimaeus.github.io/posts/guide/
Author
Slimaeus
Published at
2025-06-19
License
CC BY-NC-SA 4.0