Node.js CI #1741
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Node.js CI | |
on: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: "0 0 * * *" | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 14.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
- run: npm ci | |
- name: get commands json | |
run: npm run commands | |
env: | |
CPM_IP: ${{secrets.CPM_IP}} | |
CPM_PORT: ${{secrets.CPM_PORT}} | |
CPM_ADMINUSER: ${{secrets.CPM_ADMINUSER}} | |
CPM_ADMINTOKEN: ${{secrets.CPM_ADMINTOKEN}} | |
- run: npm run build | |
- uses: EndBug/add-and-commit@v6 | |
with: | |
# The arguments for the `git add` command (see the paragraph below for more info) | |
# Default: '.' | |
add: "docs/.vuepress/public/assets/commands" | |
author_name: Command updater bot | |
author_email: [email protected] | |
# The message for the commit | |
# Default: 'Commit from GitHub Actions (name of the workflow)' | |
message: "Update commands reference" | |
# Token to use for pushing the commit. The default value won't trigger any workflows, you need to use a Personal Access Token for that. | |
# Default: secrets.GITHUB_TOKEN | |
token: ${{ secrets.PAT_COMMANDS }} |