Skip to content

Conversation

@cwsteinbach
Copy link
Contributor

@cwsteinbach cwsteinbach commented Aug 19, 2021

Update instructions for publishing site.

@github-actions github-actions bot added the docs label Aug 19, 2021
@cwsteinbach cwsteinbach requested a review from rdblue August 19, 2021 22:31
mkdocs gh-deploy
rm -r site
mkdir site
cp ../.asf.yaml site/
Copy link
Contributor

Choose a reason for hiding this comment

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

As this uses ../.asf.yaml, which directory does this document assume we are running these commands from?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point. I updated the README to include this information.

Copy link
Contributor

Choose a reason for hiding this comment

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

If we're in the $projectRoot/site directory, should it be rm -r docs && mkdir docs?

My site directory looks as follows.

$ ls -la site
total 24
drwxr-xr-x   6 kbendickson  staff   192B Aug 19 16:08 .
drwxr-xr-x  59 kbendickson  staff   1.8K Aug 19 16:08 ..
-rw-r--r--   1 kbendickson  staff   1.6K Aug 19 16:08 README.md
drwxr-xr-x  43 kbendickson  staff   1.3K Aug 20 00:48 docs
-rw-r--r--   1 kbendickson  staff   3.5K Aug 19 16:08 mkdocs.yml
-rw-r--r--   1 kbendickson  staff   872B Aug 19 16:08 requirements.txt

If I enter the site directory, and rm -r site, I get an exception.

$ cd site
$ rm -r site
rm: site: No such file or directory

Copy link
Contributor

Choose a reason for hiding this comment

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

I am a bit confused, why is site removed and recreated in this process?

Copy link
Contributor

Choose a reason for hiding this comment

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

@jackye1995, normally the site directory is removed and built entirely from the docs directory when gh-deploy runs. Removing the site directory, copying the file by hand, and using --dirty does basically the same thing, but allows us to end up with .asf.yaml in the output that gets copied to the asf-site branch. That's required for publishing now, which is why this change is needed.

@cwsteinbach cwsteinbach requested review from jackye1995 and removed request for rdblue August 20, 2021 18:04
### Publishing

After site changes are committed, you can publish the site with this command:
After site changes are committed, you can publish them by running the following sequence of commands from the `$projectRoot/site` directory:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think $projectRoot makes this more confusing than necessary. I think this should just refer to the site directory. If you want to make it more clear than that, then state that it's the directory where this README.md is located:

... sequence of commands from the site directory (where this README.md is located):

cp ../.asf.yaml site/
mkdocs gh-deploy --dirty
```
This assumes that the Apache remote is named `apache` and will push to the `asf-site` branch. To use a different remote add `-r <remote-name>` to the `mkdocs` command.
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add a blank line to separate the preformatted content from the next paragraph, like before.

@rdblue
Copy link
Contributor

rdblue commented Aug 22, 2021

@cwsteinbach, can you please add a description to this PR?

@cwsteinbach
Copy link
Contributor Author

Closing this PR in favor of #3008.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants