Skip to content

Building and Publishing static Example site #18

Building and Publishing static Example site

Building and Publishing static Example site #18

name: publish_build
run-name: Building and Publishing static Example site
on: [push]
# push:
# tags:
# - '*'
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: |
cd example
npm ci
npm run build
- name: Save Build Artifact
uses: actions/upload-artifact@v3
with:
name: react_build
path: example/build
release:
runs-on: ubuntu-latest
needs: build
steps:
- name: Get Build Results
uses: actions/download-artifact@v3
with:
name: react_build
path: build
- name: Display Directory
run: ls -R
- name: Zip Build
uses: thedoctor0/[email protected]
with:
filename: example_build.zip
path: build
- name: Save Zip Artifact
uses: actions/upload-artifact@v3
with:
name: example_build.zip
path: example_build.zip
- name: Release Aritfact
uses: ncipollo/[email protected]
with:
artifacts: example_build.zip