diff --git a/README.md b/README.md index 88755973..cda6c772 100644 --- a/README.md +++ b/README.md @@ -71,20 +71,17 @@ They can be manually generated or automatically from one of your publication ent ## Publishing -Grape-Academic-Theme uses jekyll-scholar and therefore needs to manually be published to GitHub pages. -A script for publishing on a `gh-pages` branch is included. -Run `_scripts/publish.sh` from the main project directory and the page will be built, copied to the `gh-pages` branch and published. -Make sure that GitHub pages is set up to publish that branch. -If additional scripts should be executed in the HTML root, they can be placed in `_scripts/publish.d` and will be automatically executed. +Since GitHub changed pages deployment to be based on Actions, Grape-Academic-Theme can be deployed fully automatically. +This project already contains the necessary GitHub workflow. These are step-by-step instructions for forking and publishing the theme at your `.github.io` github pages website: 1. For the repository to a repository named `/.github.io` 2. Go to the settings of the new repository and navigate to the "Pages" tab. - There, change the source for github pages to the `gh-pages` branch of the repository. + There, change the source for github pages to "GitHub Actions". 3. Clone the repository and go through the installation steps listed above 4. In `_config.yml`, change the `baseurl` option to an empty string (`""`) to host the webpage in the root of your `github.io` page -5. Commit the change and (with a working jekyll install) run `_scripts/publish.sh` +5. Push to GitHub and see the workflow building and publishing your website. 6. _Wait a couple of minutes_ and the demo content will show up at `.github.io` ## Customizing @@ -229,4 +226,4 @@ You can confirm how to draw tags at [here](https://grape-theme.netlify.com/2019/ ## Licence -The theme is available as open source under the terms of the [MIT Licence](https://opensource.org/licenses/MIT). \ No newline at end of file +The theme is available as open source under the terms of the [MIT Licence](https://opensource.org/licenses/MIT). diff --git a/_scripts/publish.d/example.sh b/_scripts/publish.d/example.sh deleted file mode 100755 index bb52e803..00000000 --- a/_scripts/publish.d/example.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/bash - -echo "This is an example script that will be executed in the HTML root upon publishing." -echo "HTML root content:" $(ls) \ No newline at end of file diff --git a/_scripts/publish.sh b/_scripts/publish.sh deleted file mode 100755 index 1ee40d2c..00000000 --- a/_scripts/publish.sh +++ /dev/null @@ -1,31 +0,0 @@ -#!/usr/bin/bash -# Publish to github pages on gh-pages branch - -if [ -n "$(git status --porcelain)" ]; then - echo "Please commit all changes before publishing with this script" - exit 1 -fi - -if [ ! -f "_config.yml" ]; then - echo "Please run this script from the base project directory" - exit 1 -fi - -commit_hash=$(git rev-parse HEAD) -branch=$(git rev-parse --abbrev-ref HEAD) -if [ -d "_scripts/publish.d" ]; then - rm -r "/tmp/publish.d" - cp -r "_scripts/publish.d" "/tmp/publish.d" -fi -bundle exec jekyll b -d /tmp/gh-pages-publish -git checkout gh-pages -git pull -git ls-files -z -- . ':!:.git*' | xargs -0 rm -f -cp -r /tmp/gh-pages-publish/* . -for script in "/tmp/publish.d/*"; do - $script -done -git add . -git commit -m "publish commit ${commit_hash}" -git push -git checkout ${branch}