This GitHub Action deploys a project to GitHub Pages.
Refer to the documentation for detailed usage instructions.
Input | Description | Required | Default |
---|---|---|---|
token |
GitHub token | false |
|
deploy_key |
Deploy key | false |
|
personal_token |
Personal access token | false |
|
commit_message |
Commit message | true |
Deploy to GitHub Pages |
full_commit_message |
Whether to use full commit message | false |
false |
external_repository |
External repository name | true |
|
publish_branch |
Branch to publish to | true |
gh-pages |
force_orphan |
Force orphan branch | false |
false |
user_name |
Git username | false |
github-actions |
user_email |
Git email | false |
github-actions@github.com |
tag_name |
Tag name | false |
|
tag_message |
Tag message | false |
|
disable_nojekyll |
Disable Jekyll | false |
false |
cname |
CNAME file content | false |
|
allow_empty_commit |
Allow empty commit | false |
false |
name: Deploy to GitHub Pages
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Deploy to GitHub Pages
uses: Sivamani-18/github-pages-action@v1.0.1
with:
github_token: ${{ secrets.ACTIONS_DEPLOY_KEY }}
publish_dir: './out'
user_name: 'Your Name'
user_email: 'your-email@example.com'
To build the TypeScript project, run:
npm run build
To run tests, add your test scripts and run:
npm test
To lint the project, run:
npm run lint
This project is licensed under the MIT License.