Skip to content

Commit

Permalink
Deploy to GitHub Pages using native actions
Browse files Browse the repository at this point in the history
  • Loading branch information
oprypin committed Oct 14, 2023
1 parent f636071 commit 7ab63dc
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,10 @@ on:
- cron: '0 6 * * 6'
jobs:
build:
name: Deploy docs
runs-on: ubuntu-latest
steps:
- name: Download source
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
Expand All @@ -19,9 +18,21 @@ jobs:
run: pip install --no-deps -r docs/requirements.txt
- name: Build site
run: mkdocs build
- name: Deploy to gh-pages
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: oprypin/push-to-gh-pages@v3
- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@v2
with:
publish_dir: site
commit_message: 'Generate docs: '
path: site
deploy:
if: github.event_name == 'push' && github.ref_name == github.event.repository.default_branch
needs: build
permissions:
pages: write
id-token: write
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

0 comments on commit 7ab63dc

Please sign in to comment.