Skip to content

Commit

Permalink
website: deploy website from GitHub Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
itchyny committed Jan 26, 2025
1 parent 31dac28 commit c32198f
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 41 deletions.
32 changes: 21 additions & 11 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ permissions:
contents: write

jobs:
website:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand All @@ -28,13 +28,23 @@ jobs:
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
run: pipenv run python3 build_website.py
working-directory: docs
- uses: actions/upload-pages-artifact@v3
with:
path: docs/output/

deploy:
needs: build
runs-on: ubuntu-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
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 c32198f

Please # to comment.