.github/workflows/main.yml #126
Workflow file for this run
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
on: | |
[create, workflow_dispatch] | |
permissions: | |
id-token: write | |
actions: write | |
checks: write | |
contents: write | |
deployments: write | |
discussions: write | |
issues: write | |
packages: write | |
pages: write | |
pull-requests: write | |
repository-projects: write | |
security-events: write | |
statuses: write | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '16.15.0' | |
- name: npm install, build and test | |
run: | | |
npm install | |
npm run build | |
- name: documents | |
run: npx api-extractor run | |
continue-on-error: true | |
- run: npx api-documenter markdown -i ./temp | |
- uses: actions/checkout@v3 | |
with: | |
repository: 'heipiao233/dmclc' | |
path: 'docs' | |
ref: 'docs' | |
- run: | | |
cp ./markdown/* ./docs/ -r | |
tar cvzf locales.tar.gz locales | |
cp ./locales.tar.gz ./docs/ | |
cd ./docs/ | |
git config --global user.email "[email protected]" | |
git config --global user.name "bot" | |
git add . | |
git commit -m "auto document and locale" | |
git push | |
continue-on-error: true | |
- name: publish | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
continue-on-error: true |