From 163c5761e96df21468c83f0e832f92eb4b508e0a Mon Sep 17 00:00:00 2001 From: Cotes Chung <11371340+cotes2020@users.noreply.github.com> Date: Sat, 10 Sep 2022 17:23:20 +0800 Subject: [PATCH] docs: update deployment tutorial --- _posts/2019-08-09-getting-started.md | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/_posts/2019-08-09-getting-started.md b/_posts/2019-08-09-getting-started.md index 50b26a0..d1b9722 100644 --- a/_posts/2019-08-09-getting-started.md +++ b/_posts/2019-08-09-getting-started.md @@ -105,27 +105,15 @@ Before the deployment begins, check out the file `_config.yml`{: .filepath} and Now you can choose ONE of the following methods to deploy your Jekyll site. -### Deploy by Using Github Actions +### Deploy by Using GitHub Actions -For security reasons, GitHub Pages build runs on `safe` mode, which restricts us from using plugins to generate additional page files. Therefore, we can use **GitHub Actions** to build the site, store the built site files on a new branch, and use that branch as the source of the GitHub Pages service. - -Quickly check the files needed for GitHub Actions build: - -- Ensure your Jekyll site has the file `.github/workflows/pages-deploy.yml`{: .filepath}. Otherwise, create a new one and fill in the contents of the [sample file][workflow], and the value of the `on.push.branches` should be the same as your repo's default branch name. - -- Furthermore, if you have committed `Gemfile.lock`{: .filepath} to the repo, and your runtime system is not Linux, don't forget to update the platform list in the lock file: - - ```console - $ bundle lock --add-platform x86_64-linux - ``` - -After the above steps, rename your repository to `.github.io` on GitHub. +Ensure your Jekyll site has the file `.github/workflows/pages-deploy.yml`{: .filepath}. Otherwise, create a new one and fill in the contents of the [sample file][workflow], and the value of the `on.push.branches` should be the same as your repo's default branch name. And then rename your repository to `.github.io` on GitHub. Now publish your Jekyll site: 1. Browse to your repository on GitHub. Select the tab _Settings_, then click _Pages_ in the left navigation bar. Then, in the **Source** section (under _Build and deployment_), select [**GitHub Actions**][pages-workflow-src] from the dropdown menu. -2. Push any commit to remote to trigger the GitHub Actions workflow. In the _Actions_ tab of your repository, you should see the "Automatic build and deploy" workflow with at least one job running. Once the build is complete and successful, the site should be deployed automatically. +2. Push any commit to remote to trigger the GitHub Actions workflow. In the _Actions_ tab of your repository, you should see the "Deploy Jekyll with GitHub Pages" workflow with at least one job running. Once the build is complete and successful, the site should be deployed automatically. 3. Visit your website at the address indicated by GitHub. @@ -178,5 +166,5 @@ The merge is likely to conflict with your local modifications. Please be patient [use-starter]: https://github.com/cotes2020/chirpy-starter/generate [workflow]: https://github.com/cotes2020/jekyll-theme-chirpy/blob/master/.github/workflows/pages-deploy.yml.hook [chirpy-4.1.0]: https://github.com/cotes2020/jekyll-theme-chirpy/releases/tag/v4.1.0 -[pages-workflow-src]: https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflowconfiguring-a-publishing-source-for-your-github-pages-site +[pages-workflow-src]: https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow [latest-tag]: https://github.com/cotes2020/jekyll-theme-chirpy/tags