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 pnpm
to install pnpm . - Run
pnpm install
to install dependencies. - Add
deploy.yml
file to.github/workflows
folder..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
.nojekyll
empty file to the root folder. - Run
pnpm run format
andpnpm run lint
- Commit and push.
References
Deploy this pages
https://slimaeus.github.io/posts/guide/