Skip to content

Commit

Permalink
Add a more detailed usage example, referring to issue actions#6
Browse files Browse the repository at this point in the history
  • Loading branch information
FergusRooney committed Jun 23, 2023
1 parent 6e866d0 commit 2c55e52
Showing 1 changed file with 30 additions and 1 deletion.
31 changes: 30 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,37 @@ A composite Action for packaging and uploading artifact that can be deployed to
⚠️ Official support for building Pages with Actions is in public beta at the moment.

# Usage
As an example you may want to build your page as a pages artifact so you can publish it using [actions/deploy-pages](https://github.com/actions/deploy-pages). This actions completes steps 1-4 from [this tutorial](https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#creating-a-custom-github-actions-workflow-to-publish-your-site)

See [action.yml](action.yml)
```
name: Build Page + Upload artifact
on:
push:
branches:
- main
jobs:
build-upload:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v3
# Replace this step your own page build process
- name: Build your page
run: |
cd docs/
make html
# Change path to link include index of your webpage
- name: Upload your page as github pages artifact
uses: actions/upload-pages-artifact@main
with:
path: docs/build/html/
```
After you have uploaded the pages artifact, you can add another job that deploys the artifact using the [actions/deploy-pages](https://github.com/actions/deploy-pages) action

See [action.yml](action.yml) for the full parameters (This is the action itself not an example)

<!-- TODO: document custom workflow -->

Expand Down

0 comments on commit 2c55e52

Please sign in to comment.