How to add `dist/` directory?
See original GitHub issueCheck list before opening this issue
- I read the latest README
- I checked Available Options
- I followed Tips and FAQ
- I tried Workflow Examples
- I read the latest GitHub Actions official documentation and learned the basic spec and concepts
Describe your question
- My project file tree:
my-repository/
|- index.html ... entrypoint
|- src/ ... source codes
|- dist/ ... created by `$ npm run build`
.gitignore
node_modules/
dist/
index.html
is located in project root directory.
So I want to upload to gh-pages like this:
https://example.github.io/my-repository/index.html
https://example.github.io/my-repository/dist/bundle.js
Therefore, I wrote workflows like this:
name: Deploy To GitHub Pages
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 12.x
- name: Install
run : npm install
- name: Build
run : npm run build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: '.'
# to include `./index.html`
I expected to include dist/
.
But dist/
did not include because dist/
is specified in .gitignore
.
How to include dist/
in gh-pages?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
npm install doesnt create dist folder - Stack Overflow
Am I missing a step here or am I understanding something incorrect? Since I expected that command to create a dist/ folder out...
Read more >Generate dist folder from source code · Issue #892 - GitHub
If you don't have the dist folder already, you just need to run npm install and npm run build to generate the dist...
Read more >Webpack: Creating a custom structure for the 'dist' directory
In this video, we will find out how to create a custom structure for the webpack's ' dist ' directory. There will also...
Read more >Dist directory - Nuxt
The dist folder, short for distribution folder, is dynamically generated when using the nuxt generate commands and includes the generated production ready ...
Read more >What is the role of src and dist folders in JavaScript/jQuery
The /dist stands for distributable. · The /dist folder contains the minimized version of the source code. · The code present in the...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
You can create a new directory (e.g.
public
), moveindex.html
anddist
intopublic
, and setpublish_dir: 'public'
.This issue has been LOCKED because of it being resolved!
The issue has been fixed and is therefore considered resolved. If you still encounter this or it has changed, open a new issue instead of responding to solved ones.
<div align="right">Log | Bot Usage</div>