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

Build and deploy docs site via GitHub Actions #500

Merged
merged 2 commits into from
Dec 2, 2022

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.

None yet

3 participants