add current branch as one to watch #2
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
name: Publish documentation | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- fix-publish-docs | ||
jobs: | ||
publish-docs: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout git repo | ||
uses: actions/checkout@v3 | ||
- name: Install Node and NPM | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: [18.x] | ||
cache: npm | ||
- name: Install and build | ||
run: | | ||
npm install | ||
npm run build | ||
- name: Debug | ||
run: | | ||
pwd | ||
ls -la | ||
- name: Build documentation | ||
run: | # renaming the folders so that pages links at /{their name} instead of at /docs | ||
cd lib/papi-components | ||
npm run build:docs | ||
mv docs papi-components | ||
cd ../papi-dts | ||
npm run build:docs | ||
mv docs papi-dts | ||
- name: Deploy to GitHub Pages | ||
uses: JamesIves/[email protected] | ||
with: | ||
branch: github-pages | ||
folder: | | ||
lib/papi-components/papi-components | ||
lib/papi-dts/papi-dts |