mirror of
https://github.com/withastro/astro.git
synced 2025-01-20 22:12:38 -05:00
Update deploy.sh to include touch .nojekyll (#819)
* Update deploy.sh to include touch .nojekyll * Update deploy.md Co-authored-by: Fred K. Schott <fkschott@gmail.com>
This commit is contained in:
parent
022382cd3f
commit
55195200fa
1 changed files with 4 additions and 2 deletions
|
@ -31,8 +31,7 @@ By default, the build output will be placed at `dist/`. You may deploy this `dis
|
||||||
## GitHub Pages
|
## GitHub Pages
|
||||||
|
|
||||||
1. Set the correct `buildOptions.site` in `astro.config.mjs`.
|
1. Set the correct `buildOptions.site` in `astro.config.mjs`.
|
||||||
2. Run `touch public/.nojekyll` to create a `.nojekyll` file in `public/`. This [bypasses GitHub Page's default behavior](https://github.blog/2009-12-29-bypassing-jekyll-on-github-pages/) to ignore paths prefixed with `_`.
|
1. Inside your project, create `deploy.sh` with the following content (uncommenting the appropriate lines), and run it to deploy:
|
||||||
3. Inside your project, create `deploy.sh` with the following content (uncommenting the appropriate lines), and run it to deploy:
|
|
||||||
|
|
||||||
```bash{13,20,23}
|
```bash{13,20,23}
|
||||||
#!/usr/bin/env sh
|
#!/usr/bin/env sh
|
||||||
|
@ -46,6 +45,9 @@ By default, the build output will be placed at `dist/`. You may deploy this `dis
|
||||||
# navigate into the build output directory
|
# navigate into the build output directory
|
||||||
cd dist
|
cd dist
|
||||||
|
|
||||||
|
# add .nojekyll to bypass GitHub Page's default behavior
|
||||||
|
touch .nojekyll
|
||||||
|
|
||||||
# if you are deploying to a custom domain
|
# if you are deploying to a custom domain
|
||||||
# echo 'www.example.com' > CNAME
|
# echo 'www.example.com' > CNAME
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue