make link colorful #42
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy Astro to GitHub Pages | |
on: | |
push: | |
branches: | |
- main # Trigger deployment on push to the main branch | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
# Step 1: Checkout the repository | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
# Step 2: Set up pnpm | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 10 | |
# Step 3: Install project dependencies | |
- name: Install Dependencies | |
run: pnpm install | |
# Step 4: Build the Astro project | |
- name: Build Project | |
run: pnpm run build | |
# Step 5: Deploy to GitHub Pages | |
- name: Deploy to GitHub Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GH_PAT }} | |
publish_dir: dist # The folder to deploy (default build output of Astro) |