An action that publishes GitHub Pages with a directory.
Configure your workflow.
mysticatea-actions/gh-pages@v0
Name | Description |
---|---|
token | Required. GitHub Token to push. |
sourceDir | Required. The directory that contains the contents of GitHub Pages. |
commitUserName | Optional. The name of commit user. Default is $GITHUB_ACTOR . |
commitUserEmail | Optional. The email of commit user. Default is [email protected] . |
commitMessage | Optional. The commit message. Default is "Update Website" . |
name: CI
on:
push:
branches: [master]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
- name: Install Packages
run: npm install
- name: Build
run: npm run -s build
# Publish!
- name: Publish GitHub Pages
uses: mysticatea-actions/gh-pages@v0
with:
token: ${{ secrets.GITHUB_TOKEN }}
sourceDir: path/to/built/docs
npm test
... Run tests.npm version <how>
... Bump a version and release it. The<how>
is one ofpatch
,minor
,major
, and etc. See https://docs.npmjs.com/cli/version for details. This will do the following steps:- Check the code with ESLint and TypeScript compiler.
- Run tests.
- Bump version.
- Build the code.
- Release it with scripts/release.ts script.
npm run build
... Build code then createdist
directory.