v8.1.2 #125
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: Build, Test, and Deploy | |
on: | |
push: | |
branches: | |
- '*' | |
release: | |
types: [published] | |
permissions: | |
pages: write | |
id-token: write | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Compile Less to CSS | |
run: npx less-watch-compiler src/less src main.less --run-once | |
- name: Build | |
run: yarn build | |
- name: Upload build artifacts | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: dist/ | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: yarn install --frozen-lockfile | |
- name: Compile Less to CSS | |
run: npx less-watch-compiler src/less src main.less --run-once | |
- name: Run ESLint | |
run: yarn lint | |
- name: Type Check | |
run: yarn typecheck | |
deploy: | |
if: github.event_name == 'release' | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
needs: [build, test] | |
steps: | |
- name: Deploy | |
id: deployment | |
uses: actions/deploy-pages@v4 |