Deploys a given folder to gh-pages branch with git
name: Deploy to gh-pages
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Install and build
run: |
npm install
npm run build
- name: Simple deploy with git
uses: rdarida/simple-github-pages-deploy-action@v1
with: # optional
git-user: '<your GitHub username>'
git-email: '<your email address>'
git-base-folder: '<output folder of your build>'
commit-message: '<your commit message>'
branch: '<target branch for deployment>'
In the project directory, you can run:
Runs right after npm install
, and sets up husky
Runs Prettier and formats all the *.js, *.json, *.yml, and *.yaml files.
Runs standard-version for versioning using semver and CHANGELOG generation powered by Conventional Commits.
A quick look at the top-level files and directories.
.
├── .vscode/
├── node_modules/
├── .editorconfig
├── .gitignore
├── .prettierignore
├── .prettierrc
├── action.yml
├── CHANGELOG.md
├── commitlint.config.js
├── LICENSE
├── package.json
├── package-lock.json
└── README.md
-
.vscode/
: This directory contains the project specific settings.json. -
node_modules/
: This directory contains all of the modules of the code that your project depends on (npm packages) are automatically installed. -
.editorconfig
: EditorConfig helps maintain consistent coding styles for multiple developers working on the same project across various editors and IDEs. -
.gitignore
: This file tells git which files should not track / not maintain a version history for. -
.prettierignore
: This is a configuration file for Prettier. It tells the prettier which files should not format. -
.prettierrc
: This is a configuration file for Prettier. Prettier is a tool to help keep the formatting of your code consistent. -
action.yml
: Contains the Simple GitHub Pages Deploy Action. -
CHANGELOG.md
: All notable changes to this project will be documented in this file. See standard-version for commit guidelines. -
commitlint.config.js
: This is a configuration file for commitlint. -
LICENSE
: This template is licensed under the MIT license. -
package-lock.json
(Seepackage.json
below, first). This is an automatically generated file based on the exact versions of your npm dependencies that were installed for your project. (You won’t change this file directly). -
package.json
: A manifest file for Node.js projects, which includes things like metadata (the project’s name, author, etc). This manifest is how npm knows which packages to install for your project. -
README.md
: A text file containing useful reference information about your project.