Skip to content

Commit e0c1d47

Browse files
[2023-02-22]: Disable symlinks on legacy pages build infrastructure - [GA] (github#34673)
Co-authored-by: Siara <[email protected]>
1 parent b263906 commit e0c1d47

File tree

6 files changed

+46
-12
lines changed

6 files changed

+46
-12
lines changed

content/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site.md

Lines changed: 22 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -31,27 +31,39 @@ shortTitle: Configure publishing source
3131
{% data reusables.pages.sidebar-pages %}
3232
{% ifversion pages-custom-workflow %}
3333
1. Under "Build and deployment", under "Source", select **Deploy from a branch**.
34-
1. Under "Build and deployment", under "Branch", use the **None** or **Branch** drop-down menu and select a publishing source.
34+
1. Under "Build and deployment", under "Branch", use the **None** or **Branch** dropdown menu and select a publishing source.
35+
36+
![Screenshot of the dropdown menu to select a publishing source](/assets/images/help/pages/publishing-source-drop-down.png)
3537

36-
![Drop-down menu to select a publishing source](/assets/images/help/pages/publishing-source-drop-down.png)
3738
{% else %}
3839
3. Under "{% data variables.product.prodname_pages %}", use the **None** or **Branch** drop-down menu and select a publishing source.
39-
![Drop-down menu to select a publishing source](/assets/images/help/pages/publishing-source-drop-down.png)
40+
41+
![Screenshot of the dropdown menu to select a publishing source](/assets/images/help/pages/publishing-source-drop-down.png)
42+
4043
{% endif %}
41-
4. Optionally, use the drop-down menu to select a folder for your publishing source.
42-
![Drop-down menu to select a folder for publishing source](/assets/images/help/pages/publishing-source-folder-drop-down.png)
43-
5. Click **Save**.
44-
![Button to save changes to publishing source settings](/assets/images/help/pages/publishing-source-save.png)
44+
1. Optionally, use the drop-down menu to select a folder for your publishing source.
45+
46+
![Screenshot of the dropdown menu to select a folder for publishing source](/assets/images/help/pages/publishing-source-folder-drop-down.png)
47+
48+
1. Click **Save**.
49+
50+
![Screenshot of the button to save changes to publishing source settings](/assets/images/help/pages/publishing-source-save.png)
4551

4652
### Troubleshooting publishing from a branch
4753

54+
{% ifversion pages-disable-symlinks-on-legacy-pages %}
55+
56+
{% data reusables.pages.symlink-removal %}
57+
58+
{% endif %}
59+
4860
{% data reusables.pages.admin-must-push %}
4961

5062
If you choose the `docs` folder on any branch as your publishing source, then later remove the `/docs` folder from that branch in your repository, your site won't build and you'll get a page build error message for a missing `/docs` folder. For more information, see "[AUTOTITLE](/pages/setting-up-a-github-pages-site-with-jekyll/troubleshooting-jekyll-build-errors-for-github-pages-sites#missing-docs-folder)."
5163

5264
{% ifversion build-pages-with-actions %}
5365

54-
Your {% data variables.product.prodname_pages %} site will always be deployed with a {% data variables.product.prodname_actions %} workflow run, even if you've configured your {% data variables.product.prodname_pages %} site to be built using a different CI tool. Most external CI workflows "deploy" to GitHub Pages by committing the build output to the `gh-pages` branch of the repository, and typically include a `.nojekyll` file. When this happens, the {% data variables.product.prodname_actions %} workflow will detect the state that the branch does not need a build step, and will execute only the steps necessary to deploy the site to {% data variables.product.prodname_pages %} servers.
66+
Your {% data variables.product.prodname_pages %} site will always be deployed with a {% data variables.product.prodname_actions %} workflow run, even if you've configured your {% data variables.product.prodname_pages %} site to be built using a different CI tool. Most external CI workflows "deploy" to {% data variables.product.prodname_pages %} by committing the build output to the `gh-pages` branch of the repository, and typically include a `.nojekyll` file. When this happens, the {% data variables.product.prodname_actions %} workflow will detect the state that the branch does not need a build step, and will execute only the steps necessary to deploy the site to {% data variables.product.prodname_pages %} servers.
5567

5668
To find potential errors with either the build or deployment, you can check the workflow run for your {% data variables.product.prodname_pages %} site by reviewing your repository's workflow runs. For more information, see "[AUTOTITLE](/actions/monitoring-and-troubleshooting-workflows/viewing-workflow-run-history)." For more information about how to re-run the workflow in case of an error, see "[AUTOTITLE](/actions/managing-workflow-runs/re-running-workflows-and-jobs)."
5769

@@ -68,7 +80,7 @@ To configure your site to publish with {% data variables.product.prodname_action
6880
{% data reusables.pages.navigate-site-repo %}
6981
{% data reusables.repositories.sidebar-settings %}
7082
{% data reusables.pages.sidebar-pages %}
71-
1. Under "Build and deployment", under "Source", select **GitHub Actions**.
83+
1. Under "Build and deployment", under "Source", select **{% data variables.product.prodname_actions %}**.
7284
1. {% data variables.product.product_name %} will suggest several starter workflows. If you already have a workflow to publish your site, you can skip this step. Otherwise, choose one of the options to create a {% data variables.product.prodname_actions %} workflow. For more information about creating your custom workflow, see "[Creating a custom {% data variables.product.prodname_actions %} workflow to publish your site](#creating-a-custom-github-actions-workflow-to-publish-your-site)."
7385

7486
{% data variables.product.prodname_pages %} does not associate a specific workflow to the {% data variables.product.prodname_pages %} settings. However, the {% data variables.product.prodname_pages %} settings will link to the workflow run that most recently deployed your site.
@@ -90,6 +102,7 @@ The starter workflows use a deployment environment called `github-pages`. If you
90102
{% ifversion fpt or ghec %}
91103
{% note %}
92104

105+
93106
**Note**: A `CNAME` file in your repository file does not automatically add or remove a custom domain. Instead, you must configure the custom domain through your repository settings or through the API. For more information, see "[AUTOTITLE](/pages/configuring-a-custom-domain-for-your-github-pages-site/managing-a-custom-domain-for-your-github-pages-site#configuring-a-subdomain)" and the [Pages API reference documentation](/rest/pages#update-information-about-a-github-pages-site).
94107

95108
{% endnote %}

content/pages/setting-up-a-github-pages-site-with-jekyll/troubleshooting-jekyll-build-errors-for-github-pages-sites.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ To troubleshoot, make sure that your *_config.yml* file follows these rules:
6060

6161
{% data reusables.pages.yaml-linter %}
6262

63+
{% ifversion pages-disable-symlinks-on-legacy-pages %}
64+
65+
{% data reusables.pages.symlink-removal %}
66+
67+
{% endif %}
68+
6369
## Date is not a valid datetime
6470

6571
This error means that one of the pages on your site includes an invalid datetime.
@@ -72,11 +78,13 @@ This error means that your code references a file that doesn't exist in your *_i
7278

7379
{% data reusables.pages.search-for-includes %} If any of the files you've referenced aren't in the *_includes* directory, copy or move the files into the *_includes* directory.
7480

81+
{% ifversion ghes < 3.9 %}
7582
## File is a symlink
7683

7784
This error means that your code references a symlinked file that does not exist in the published files for your site.
7885

7986
{% data reusables.pages.search-for-includes %} If any of the files you've referenced are symlinked, copy or move the files into the *_includes* directory.
87+
{% endif %}
8088

8189
## File is not properly UTF-8 encoded
8290

@@ -160,11 +168,13 @@ Permalinks are permanent URLs that reference a particular page on your site. Abs
160168

161169
To troubleshoot, remove the `relative_permalinks` line from your *_config.yml* file and reformat any relative permalinks in your site with absolute permalinks. For more information, see "[AUTOTITLE](/repositories/working-with-files/managing-files/editing-files)."
162170

171+
{% ifversion ghes < 3.9 %}
163172
## Symlink does not exist within your site's repository
164173

165174
This error means that your site includes a symbolic link (symlink) that does not exist in the published files for your site. For more information about symlinks, see "[Symbolic link](https://en.wikipedia.org/wiki/Symbolic_link)" on Wikipedia.
166175

167176
To troubleshoot, determine if the file in the error message is used to build your site. If not, or if you don't want the file to be a symlink, delete the file. If the symlinked file is necessary to build your site, make sure the file or directory the symlink references is in the published files for your site. To include external assets, consider using {% ifversion fpt or ghec %}`git submodule` or {% endif %}a third-party package manager such as [Bower](https://bower.io/).{% ifversion fpt or ghec %} For more information, see "[AUTOTITLE](/pages/getting-started-with-github-pages/using-submodules-with-github-pages)."{% endif %}
177+
{% endif %}
168178

169179
## Syntax error in 'for' loop
170180

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Issue 9540
2+
# Disable symlinks on legacy pages build infrastructure
3+
versions:
4+
fpt: '*'
5+
ghec: '*'
6+
ghes: '>=3.9'
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
{% tip %}
1+
{% note %}
22

33
**Note**: {% ifversion pages-custom-workflow %}If you are publishing from a branch and{% else %}If{% endif %} your site has not published automatically, make sure someone with admin permissions and a verified email address has pushed to the publishing source.
44

5-
{% endtip %}
5+
{% endnote %}

data/reusables/pages/pages-custom-workflow-beta.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
{% note %}
44

5-
Note: Publishing your {% data variables.product.prodname_pages %} site with a custom {% data variables.product.prodname_actions %} workflow is in beta and subject to change.
5+
**Note:** Publishing your {% data variables.product.prodname_pages %} site with a custom {% data variables.product.prodname_actions %} workflow is in beta and subject to change.
66

77
{% endnote %}
88

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{% note %}
2+
3+
**Note:** If your repository contains symbolic links, you will need to publish your site using a {% data variables.product.prodname_actions %} workflow. For more information about {% data variables.product.prodname_actions %}, see "[Actions](/actions)."
4+
5+
{% endnote %}

0 commit comments

Comments
 (0)