Differences
This shows you the differences between two versions of the page.
— |
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: | ||
+ | |||
+ | steps: | ||
+ | - uses: actions/ | ||
+ | - name: Use Node.js ${{ matrix.node-version }} | ||
+ | uses: actions/ | ||
+ | with: | ||
+ | node-version: | ||
+ | - run: npm ci | ||
+ | - run: npm run build --if-present | ||
+ | - name: Archive | ||
+ | uses: actions/ | ||
+ | with: | ||
+ | name: build | ||
+ | path: | | ||
+ | dist | ||
+ | </ | ||
+ | |||
+ | ---- | ||