Skip to content

24.04.16: userinfo logout if session expires in less than hour [WTEL-… #260

24.04.16: userinfo logout if session expires in less than hour [WTEL-…

24.04.16: userinfo logout if session expires in less than hour [WTEL-… #260

Workflow file for this run

name: Webitel UI release with docs
on:
push:
branches: [ master ]
jobs:
install_deps:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache node_modules
uses: actions/cache@v4
id: cache_node_modules
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dependencies
if: steps.cache_node_modules.outputs.cache-hit != 'true'
run: npm ci
test:
needs: [install_deps]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- run: npm run test:unit
release:
needs: [install_deps, test]
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: get-npm-version
id: package-version
uses: martinbeentjes/[email protected]
- name: Create release
id: create_release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.package-version.outputs.current-version}}
name: "Webitel UI Release ${{ steps.package-version.outputs.current-version}}"
body: "This is a release of Webitel UI version ${{ steps.package-version.outputs.current-version}}, built on ${{ github.run_date }}"
generate_release_notes: true
publish:
needs: [install_deps, test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org
- name: Check publish status
id: check_publish
uses: tehpsalmist/npm-publish-status-action@v1
- name: Publish release
id: publish_release
if: ${{ steps.check_publish.outputs.exists == '0' }}
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
echo "Publishing release, ${{ steps.check_publish.outputs.exists }}"
npm run build
npm publish --access public
- name: Report publish status
if: ${{ steps.check_publish.outputs.exists == '1' }}
run: echo "Package already published"
build_docs:
needs: [install_deps]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v3
with:
path: node_modules
key: node_modules-${{ hashFiles('**/package-lock.json') }}
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Build docs
run: npm run docs:build
- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
name: docs
path: docs/.vitepress/dist
deploy:
needs: [build_docs]
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
runs-on: ubuntu-latest
steps:
- name: setup Github Pages
id: setup_pages
uses: actions/configure-pages@v4
- name: deploy to Github Pages
id: deploy_pages
uses: actions/deploy-pages@v4
with:
artifact_name: docs