Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: main branch docs #21

Merged
merged 10 commits into from
Mar 31, 2024
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
workflow_dispatch:

concurrency:
group: ${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
Expand Down
16 changes: 11 additions & 5 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
name: documentation

on: [push, pull_request, workflow_dispatch]
on:
pull_request:
push:
branches:
- main
workflow_dispatch:

concurrency:
group: ${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
Expand All @@ -27,17 +32,18 @@ jobs:
id: extract_branch
- name: Deploy to GitHub Pages (branch)
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref != 'refs/heads/main' }}
if: ${{ github.event_name != 'push' && github.ref != 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
destination_dir: branch/${{ steps.extract_branch.outputs.branch }}
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
if: ${{ github.ref == 'refs/heads/main' }}
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/_build/html
destination_dir: /
destination_dir: ./
keep_files: true
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- published

concurrency:
group: ${{ github.ref }}
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

permissions:
Expand Down
Loading