-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implement the
publish-pages.yml
action
- Loading branch information
1 parent
e333aaf
commit 6dcd3b6
Showing
2 changed files
with
48 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Publish Page Action | ||
|
||
inputs: | ||
target: | ||
required: true | ||
type: string | ||
base_path: | ||
required: true | ||
type: string | ||
|
||
runs: | ||
steps: | ||
- name: Checkout 🛎️ | ||
uses: actions/checkout@v3 | ||
- name: Build DocC | ||
run: | | ||
swift build; | ||
swift package \ | ||
--allow-writing-to-directory ./docs \ | ||
generate-documentation \ | ||
--target ${{ inputs.target }} \ | ||
--output-path ./docs \ | ||
--transform-for-static-hosting \ | ||
--hosting-base-path ${{ inputs.base_path }}; | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: 'docs' | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters