Skip to content

Commit

Permalink
Merge pull request #15 from oblivioncth/dev
Browse files Browse the repository at this point in the history
CI: Use official Actions-based pages deployment
  • Loading branch information
oblivioncth committed Mar 17, 2023
2 parents 4962da3 + b380f4a commit f5dda21
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-qi-qmp-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ jobs:
- name: Set doc artifact name
id: set_doc_artifact_name
if: matrix.lib_linkage == 'static'
run: echo "doc_artifact_name=$current_artifact_name" >> $Env:GITHUB_OUTPUT
run: echo "doc_artifact_name=${{ env.current_artifact_name }}" >> $Env:GITHUB_OUTPUT
- name: Upload QI-QMP build artifact
uses: actions/upload-artifact@v3
with:
Expand Down
27 changes: 16 additions & 11 deletions .github/workflows/master-pull-request-merge-reaction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,29 @@ jobs:
name: Update gh-pages
needs: [build_qi_qmp_release_windows]
if: github.event.pull_request.merged == true
runs-on: windows-latest
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.page-deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Download built shared QI-QMP artifact
uses: actions/download-artifact@v3
with:
name: ${{ needs.build_qi_qmp_release_windows.outputs.doc_artifact_name }}
path: ${{ env.doc_artifact_path }}
- name: Upload docs to gh-pages
uses: peaceiris/actions-gh-pages@v3
- name: Setup pages
uses: actions/configure-pages@v3
- name: Upload pages artifact
uses: actions/upload-pages-artifact@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ${{ env.doc_artifact_path }}/doc/html
destination_dir: ./docs
allow_empty_commit: true # So that doc build date is always roughly synced with latest build date
enable_jekyll: false
user_name: '${{ env.ci_bot_username}}'
user_email: '${{ env.ci_bot_email }}'
path: ${{ env.doc_artifact_path }}/doc/html
- name: Deploy pages artifact
id: page-deployment
uses: actions/deploy-pages@v1

create-release:
name: Create GitHub release
Expand Down

0 comments on commit f5dda21

Please sign in to comment.