152 words
1 minute
Deploy this pages
NOTEI already have npm installed on my machine and have set up GitHub Pages.
- Create blog repository:
- Generate a new repository from this template.
- Run
npm install -g pnpmto install pnpm . - Run
pnpm installto install dependencies. - Add
deploy.ymlfile to.github/workflowsfolder..github/workflows/deploy.yml name: Deploy to GitHub Pageson:push:branches: [ main ]workflow_dispatch:permissions:3 collapsed linescontents: readpages: writeid-token: writejobs:build:6 collapsed linesruns-on: ubuntu-lateststeps:- name: Checkout your repository using gituses: actions/checkout@v4- name: Install, build, and upload your siteuses: withastro/action@v3deploy:9 collapsed linesneeds: buildruns-on: ubuntu-latestenvironment:name: github-pagesurl: ${{ steps.deployment.outputs.page_url }}steps:- name: Deploy to GitHub Pagesid: deploymentuses: actions/deploy-pages@v4 - Edit the config file
src/config.ts.src/config.ts export const siteConfig: SiteConfig = {title: "Slimaeus",subtitle: "My profile",//...} - Edit the file
astro.config.ts.astro.config.ts export default defineConfig({site: "https://slimaeus.github.io/",//...}) - Create
.nojekyllempty file to the root folder. - Run
pnpm run formatandpnpm run lint - Commit and push.
References
Deploy this pages
https://slimaeus.github.io/posts/guide/