Github Actions
Example action to build project and keep build output as artifact
- build-nodejs.yaml
name: Build Website on: push: branches: [ master ] pull_request: branches: [ master ] jobs: build: runs-on: ubuntu-latest strategy: matrix: node-version: [16.x] steps: - uses: actions/checkout@v3 - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - run: npm ci - run: npm run build --if-present - name: Archive artifacts uses: actions/upload-artifact@v3 with: name: build path: | dist