Skip to content

Commit

Permalink
Merge branch 'deploy-pages-github-actions'
Browse files Browse the repository at this point in the history
  • Loading branch information
itchyny committed Jan 26, 2025
2 parents 31dac28 + b4e1ef4 commit 44fa2e5
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 43 deletions.
37 changes: 24 additions & 13 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ permissions:
contents: write

jobs:
website:
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -26,15 +29,23 @@ jobs:
run: pip install pipenv
- name: Install dependencies
run: pipenv sync
working-directory: docs
- name: Update website
run: scripts/update-website
- name: Commit changes
run: |
if ! git diff --quiet; then
git add --all
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
git commit -m 'Update website'
git push origin gh-pages
fi
- name: Build website
run: pipenv run python3 build_website.py
- uses: actions/upload-pages-artifact@v3
with:
path: docs/output/

deploy:
needs: build
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
uses: actions/deploy-pages@v4
id: deployment
30 changes: 0 additions & 30 deletions scripts/update-website

This file was deleted.

0 comments on commit 44fa2e5

Please # to comment.