Skip to content

Commit

Permalink
build: Switch docs workflow to official GitHub actions
Browse files Browse the repository at this point in the history
  • Loading branch information
empicano committed Aug 6, 2024
1 parent b2f16fa commit c8e66f7
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 27 deletions.
35 changes: 15 additions & 20 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,23 +1,18 @@
name: Documentation

on:
push:
branches: [main]
paths:
- "docs/**"
- "aiomqtt/**"
- README.md
- .github/workflows/docs.yml
pull_request:
paths:
- "docs/**"
- "aiomqtt/**"
- README.md
- .github/workflows/docs.yml

jobs:
docs:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
permissions:
contents: read
pages: write
id-token: write
defaults:
run:
shell: bash
Expand All @@ -43,12 +38,12 @@ jobs:
run: scripts/setup
- name: Build documentation
run: scripts/docs
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/main'
- name: Upload artifact
# if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build
publish_branch: documentation
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
path: docs/_build
- name: Deploy to GitHub Pages
# if: github.ref == 'refs/heads/main'
id: deployment
uses: actions/deploy-pages@v4
8 changes: 3 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
name: Publish

on:
release:
types: [published]

jobs:
publish:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
environment:
name: pypi
url: https://pypi.org/project/aiomqtt
permissions:
id-token: write
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v3
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
name: Tests

on:
push:
branches: [main]
pull_request:

jobs:
test:
strategy:
Expand Down

0 comments on commit c8e66f7

Please sign in to comment.