Differences

This shows you the differences between two versions of the page.

Link to this comparison view

development:deploy:github_actions [2023/06/02 20:54] (current)
kalenpw created
Line 1: Line 1:
 +====== Github Actions ======
 +Example action to build project and keep build output as artifact
 +
 +<file yaml 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
 +</file>
 +
 +----