Skip to content

Commit

Permalink
Merge pull request #45 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 authored Mar 18, 2023
2 parents 964d1af + 0ad3995 commit 6e413c9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-starpp-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,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 STARpp build artifact
uses: actions/upload-artifact@v3
with:
Expand Down
29 changes: 17 additions & 12 deletions .github/workflows/master-pull-request-merge-reaction.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,24 +57,29 @@ jobs:
name: Update gh-pages
needs: [build_starpp_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 static STARpp artifact
uses: actions/download-artifact@v3
with:
name: ${{ needs.build_starpp_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
needs: [update-docs, build_starpp_release_windows, build_starpp_release_linux, tag_master_and_sync_dev]
Expand All @@ -88,7 +93,7 @@ jobs:
- name: Zip up release artifacts
shell: pwsh
run: |
$artifact_folders = Get-ChildItem -Directory -Path "${{ env.artifacts_path }}"
$artifact_folders = Get-ChildItem -Directory -Path "${{ env.artifacts_path }}" -Exclude "github-pages"
foreach($art_dir in $artifact_folders)
{
$name = $art_dir.name
Expand Down

0 comments on commit 6e413c9

Please sign in to comment.