Skip to content

Commit

Permalink
enable pages, and quote the action path only but not *
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Jan 6, 2025
1 parent d94ea88 commit 142f04b
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ jobs:
steps:
- uses: actions/checkout@v4
- uses: actions/configure-pages@v5
with:
enablement: true
- uses: r-lib/actions/setup-r@HEAD
with:
use-public-rspm: true
Expand Down
10 changes: 9 additions & 1 deletion docs/07-site.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,15 @@ You may use GitHub Actions to automatically build and deploy package websites.
The key is to call `litedown::fuse_site()`. I have provided [a simple GitHub
action](https://github.com/yihui/litedown/blob/main/site/action.yml) in the
**litedown** repository, and you can add a step `uses: yihui/litedown/site@HEAD`
to your GitHub workflow to use it. Below is [the full
to your GitHub workflow to use it.

::: callout-note
Remember to enable the deployment of GitHub Pages via GitHub Actions in your
repository settings (`Settings` → `Pages` → `Build and deployment` → `Source` →
`GitHub Actions`).
:::

Below is [the full
workflow](https://github.com/yihui/litedown/blob/main/.github/workflows/github-pages.yml)
for building and publishing **litedown**'s site to GitHub Pages:

Expand Down
2 changes: 1 addition & 1 deletion site/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ runs:
cd "${{ inputs.pkg-root }}"
mkdir -p "${{ inputs.site-dir }}"
cd "${{ inputs.site-dir }}"
[ -z "$(ls -A)" ] && cp -r "${{ github.action_path }}/*" ./
[ -z "$(ls -A)" ] && cp -r "${{ github.action_path }}"/* ./
[ -f "_footer.Rmd" ] && Rscript -e "litedown::fuse('_footer.Rmd', '.md')"
rm -f ${{ inputs.exclude }}
Rscript -e "litedown::fuse_site()"
Expand Down

0 comments on commit 142f04b

Please sign in to comment.