hotfix #51
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: CI | |
on: | |
push: | |
branches: | |
- main | |
- HEAD | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '10.14.2' | |
- name: Cache npm dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: npm install --quiet --no-progress | |
- name: Bundle | |
run: npx gulp bundle | |
- name: Prepare artifacts | |
if: github.ref == 'refs/heads/main' | |
run: | | |
mkdir -p public | |
cp build/ui-bundle.zip public/ui-bundle.zip | |
deploy: | |
needs: build | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '10.14.2' | |
- name: Cache npm dependencies | |
uses: actions/cache@v2 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install dependencies | |
run: npm install --quiet --no-progress | |
- name: Preview build | |
run: npx gulp preview:build | |
- name: Prepare artifacts | |
run: | | |
mkdir -p public | |
cp build/ui-bundle.zip public/ui-bundle.zip | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@4.1.5 | |
with: | |
branch: gh-pages | |
folder: public |