Skip to content

Commit

Permalink
Setup for GitHub Actions publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
penelopeysm committed Jan 27, 2024
1 parent 7499d0b commit 0505074
Show file tree
Hide file tree
Showing 3 changed files with 4,319 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v5

- name: Install pnpm
uses: pnpm/action-setup@v2
with:
version: latest

- name: Install dependencies
run: pnpm install

- name: Build
run: pnpm build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
3 changes: 2 additions & 1 deletion astro.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import sitemap from '@astrojs/sitemap';

// https://astro.build/config
export default defineConfig({
site: 'https://example.com',
site: 'https://penelopeysm.github.io',
base: '/blog',
integrations: [mdx(), sitemap()],
});
Loading

0 comments on commit 0505074

Please sign in to comment.