Skip to content

Update README.adoc #417

Update README.adoc

Update README.adoc #417

name: Node.js CI
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Reconfigure git to use HTTP authentication
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 16.x
cache: "npm"
registry-url: https://registry.npmjs.org
- uses: justgook/[email protected]
with:
cache: false
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
- name: install
run: npm ci && (cd demo && npm ci)
- name: build
run: npm run build && (cd demo && npm run build)
- name: test
run: npm test
- name: npm publish
if: ${{ github.event_name == 'push' }}
run: |
npm config set //registry.npmjs.org/:_authToken=$NODE_AUTH_TOKEN
npm publish --access public || true
env:
CI: true
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- name: deploy docs
if: ${{ github.event_name == 'push' }}
run: |
cd demo/dist
echo $GITHUB_ACTOR
git init
git config --global user.name $GITHUB_ACTOR
git config --global user.name [email protected]
git checkout -b gh-pages
git add -A
git commit -m "Deploy"
git remote add origin https://andreasewering:[email protected]/andreasewering/travelm-agency.git
git push -f --set-upstream origin gh-pages
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}