Skip to content

Build and deploy docs site via GitHub Actions#500

Merged
jekyllbot merged 2 commits intomasterfrom
deploy-docs-workflow
Dec 2, 2022
Merged

Build and deploy docs site via GitHub Actions#500
jekyllbot merged 2 commits intomasterfrom
deploy-docs-workflow

Conversation

@ashmaroli
Copy link
Member

Similar to how the docs are deployed for the Jekyll Core repository.

Rationale

  • Allow building with plugins to inject data at runtime.
  • Allow building with latest version of Jekyll.

run: |
SOURCE_COMMIT="$(git log -1 --pretty="%an: %B" "$GITHUB_SHA")"
pushd docs/_site &>/dev/null
: > .nojekyll
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use "touch" here? This command is a bit obtuse.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

touch <file> and : > <file> is subtly different even though they appear to do the same at first glance.

touch <file> creates <file> if it doesn't exist and just modifies last accessed time atime on subsequent uses.

: > <file> also creates <file> if it doesn't exist but will truncate its length to 0 (changes mtime) on subsequent uses.

Ref: Stack Exchange Thread.


For argument's sake, one could state that in the current context, the maintainers have total control over .nojekyll never being a non-empty file and that its contents are irrelevant regardless.

@ashmaroli
Copy link
Member Author

@jekyllbot: merge +dev

@jekyllbot jekyllbot merged commit 72391e7 into master Dec 2, 2022
@jekyllbot jekyllbot deleted the deploy-docs-workflow branch December 2, 2022 06:56
jekyllbot added a commit that referenced this pull request Dec 2, 2022
github-actions bot pushed a commit that referenced this pull request Dec 2, 2022
Ashwin Maroli: Build and deploy docs site via GitHub Actions (#500)

Merge pull request 500
@jekyll jekyll locked and limited conversation to collaborators Dec 2, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants