name: Build example page on: workflow_dispatch: push: branches: [ main ] pull_request: branches: [ main ] jobs: build: runs-on: ubuntu-latest strategy: matrix: node-version: [16.x] steps: - uses: actions/checkout@v2 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v1 with: node-version: ${{ matrix.node-version }} - name: Build production assets run: | npm install npm run prod --if-present - name: Store artifacts uses: actions/upload-artifact@v2 with: name: build-site path: dist - name: Build GitHub Pages uses: crazy-max/ghaction-github-pages@v2.6.0 with: build_dir: dist jekyll: false env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}