Skip to content

[BUGFIX] Ignore some legacy events (#20) #13

[BUGFIX] Ignore some legacy events (#20)

[BUGFIX] Ignore some legacy events (#20) #13

name: Deploy website content to Pages
on:
push:
branches: ["main"]
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout your repository using git
uses: actions/checkout@v4
- name: Check for changes in the website directory
id: check_changes
run: |
if git diff --quiet HEAD^ HEAD ./website; then
echo "changes_detected=false" >> $GITHUB_ENV
else
echo "changes_detected=true" >> $GITHUB_ENV
fi
- name: Install, build, and upload your site
if: env.changes_detected == 'true'
uses: withastro/action@v3
with:
path: ./website
node-version: 20
deploy:
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