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

Update usage readme #66

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 with your own page build process
- name: Build your page
run: |
cd docs/
make html

# Change path to include the 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