Merge pull request #61 from xy-planning-network/spk/datetime-input #113
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: Publish to npm + GitHub Pages | |
# This workflow will run on any pushed to the main branch and on any pull requests targeting main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build and publish | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Check out source code | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: ".node-version" | |
cache: "npm" | |
cache-dependency-path: ./package-lock.json | |
- name: Node version | |
run: node --version && npm --version | |
- name: Install dependencies | |
run: npm ci | |
- name: Build | |
run: npm run build | |
- name: Automated Version Bump | |
id: version-bump | |
uses: "phips28/gh-action-bump-version@master" | |
with: | |
tag-prefix: "v" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish to npm | |
run: | | |
npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }} | |
npm publish --access public | |
- name: Build for GitHub Pages | |
run: npm run build:docs | |
- name: Publish to GitHub Pages | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: trees |