Merge pull request #137 from otili9890/main #9
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
# Publish web app to github pages | |
name: Publish | |
on: | |
push: | |
branches: [master, main] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
#container: cypress/base:latest | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: 'https://registry.npmjs.org' | |
- uses: ButlerLogic/[email protected] | |
with: | |
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" | |
tag_prefix: "v" | |
id: create_tag | |
# - run: echo ${{ steps.create_tag.outputs.tagname }} | |
# - run: echo ${{ steps.create_tag.outputs.version }} | |
- name: Check if a new tag is created | |
run: "[[ '${{ steps.create_tag.outputs.tagname }}' ]]" | |
- run: npm ci | |
#- run: npm test | |
- run: npm run build | |
- name: Deploy app to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: dist | |
single-commit: true | |
clean: true | |
- run: npm run build:library | |
- name: Publish package on NPM | |
run: npm publish --access public |