Publish #823
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: Foundations CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
defaults: | |
run: | |
shell: bash -l {0} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set the correct npm version | |
run: nvm install && nvm use | |
- name: Install dependencies from npm | |
run: | | |
nvm use | |
npm ci | |
- name: Build Foundations | |
run: | | |
nvm use | |
npm run build | |
- name: Confirm the build hasn't changed any files | |
run: ./check-pristine-state package-lock.json | |
- name: Run tests | |
run: | | |
nvm use | |
npm test | |
- name: Build Sass docs | |
if: github.ref == 'refs/heads/main' | |
run: | | |
nvm use | |
npm run sassdoc | |
- name: Deploy Sass docs to backpack.github.io, if on main branch | |
uses: peaceiris/actions-gh-pages@v3 | |
if: github.ref == 'refs/heads/main' | |
with: | |
personal_token: ${{ secrets.DEPLOY_TOKEN }} | |
publish_dir: dist-sassdoc/ | |
keep_files: false | |
external_repository: backpack/sassdoc | |
publish_branch: main |