Building and Publishing static Example site #18
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |